| 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
|
|
|