Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(807)

Unified Diff: cc/picture_layer_impl.cc

Issue 12258044: cc: Add PictureLayerImpl::AsValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Size as value Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/picture_layer_impl.h ('k') | cc/picture_layer_tiling.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/picture_layer_impl.cc
diff --git a/cc/picture_layer_impl.cc b/cc/picture_layer_impl.cc
index fc0e9d0952ba72ff45a05da559b6c6cb73c815de..e140b2547d36fa6e76f2d49305f709389c76740e 100644
--- a/cc/picture_layer_impl.cc
+++ b/cc/picture_layer_impl.cc
@@ -733,4 +733,13 @@ void PictureLayerImpl::getDebugBorderProperties(
*width = DebugColors::TiledContentLayerBorderWidth(layerTreeImpl());
}
+scoped_ptr<base::Value> PictureLayerImpl::AsValue() const {
+ scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
+ LayerImpl::AsValueInto(state.get());
+
+ state->SetDouble("ideal_contents_scale", ideal_contents_scale_);
+ state->Set("tilings", tilings_->AsValue().release());
+ return state.PassAs<base::Value>();
+}
+
} // namespace cc
« no previous file with comments | « cc/picture_layer_impl.h ('k') | cc/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698