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

Unified Diff: cc/layer_tree_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/layer_tree_impl.h ('k') | cc/picture_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_impl.cc
diff --git a/cc/layer_tree_impl.cc b/cc/layer_tree_impl.cc
index b0d071efd64d7bf84ccca61ad9c15dd0fc246474..08ccebc79caece822a5049b7922254dec0dc936b 100644
--- a/cc/layer_tree_impl.cc
+++ b/cc/layer_tree_impl.cc
@@ -472,4 +472,20 @@ AnimationRegistrar* LayerTreeImpl::animationRegistrar() const {
return layer_tree_host_impl_->animationRegistrar();
}
+scoped_ptr<base::Value> LayerTreeImpl::AsValue() const {
+ scoped_ptr<base::ListValue> state(new base::ListValue());
+ typedef LayerIterator<LayerImpl,
+ std::vector<LayerImpl*>,
+ RenderSurfaceImpl,
+ LayerIteratorActions::BackToFront> LayerIteratorType;
+ LayerIteratorType end = LayerIteratorType::end(&render_surface_layer_list_);
+ for (LayerIteratorType it = LayerIteratorType::begin(
+ &render_surface_layer_list_); it != end; ++it) {
+ if (!it.representsItself())
+ continue;
+ state->Append((*it)->AsValue().release());
+ }
+ return state.PassAs<base::Value>();
+}
+
} // namespace cc
« no previous file with comments | « cc/layer_tree_impl.h ('k') | cc/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698