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

Unified Diff: cc/picture_layer_tiling.cc

Issue 12258044: cc: Add PictureLayerImpl::AsValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: cc/picture_layer_tiling.cc
diff --git a/cc/picture_layer_tiling.cc b/cc/picture_layer_tiling.cc
index fbeb89aefee83ea008c67ab50b47504a9becda49..831ae852a60941bb000a79f8e0fc34a8d58726ee 100644
--- a/cc/picture_layer_tiling.cc
+++ b/cc/picture_layer_tiling.cc
@@ -530,4 +530,13 @@ void PictureLayerTiling::DidBecomeActive() {
}
}
+scoped_ptr<base::Value> PictureLayerTiling::AsValue() const {
+ scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
+ state->SetInteger("num_tiles", tiles_.size());
+ state->SetDouble("content_scale", contents_scale_);
+ state->SetInteger("content_width", ContentRect().width());
+ state->SetInteger("content_height", ContentRect().height());
nduca 2013/02/15 01:10:24 maybe also use a Size->Value?
enne (OOO) 2013/02/15 01:14:04 Done.
+ return state.PassAs<base::Value>();
+}
+
} // namespace cc
« cc/layer_impl.cc ('K') | « cc/picture_layer_tiling.h ('k') | cc/picture_layer_tiling_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698