OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/layer_tree_impl.h" | 5 #include "cc/layer_tree_impl.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "cc/heads_up_display_layer_impl.h" | 8 #include "cc/heads_up_display_layer_impl.h" |
9 #include "cc/layer_tree_host_common.h" | 9 #include "cc/layer_tree_host_common.h" |
10 #include "cc/layer_tree_host_impl.h" | 10 #include "cc/layer_tree_host_impl.h" |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 } | 465 } |
466 | 466 |
467 DebugRectHistory* LayerTreeImpl::debug_rect_history() const { | 467 DebugRectHistory* LayerTreeImpl::debug_rect_history() const { |
468 return layer_tree_host_impl_->debugRectHistory(); | 468 return layer_tree_host_impl_->debugRectHistory(); |
469 } | 469 } |
470 | 470 |
471 AnimationRegistrar* LayerTreeImpl::animationRegistrar() const { | 471 AnimationRegistrar* LayerTreeImpl::animationRegistrar() const { |
472 return layer_tree_host_impl_->animationRegistrar(); | 472 return layer_tree_host_impl_->animationRegistrar(); |
473 } | 473 } |
474 | 474 |
| 475 scoped_ptr<base::Value> LayerTreeImpl::AsValue() const { |
| 476 scoped_ptr<base::ListValue> state(new base::ListValue()); |
| 477 typedef LayerIterator<LayerImpl, |
| 478 std::vector<LayerImpl*>, |
| 479 RenderSurfaceImpl, |
| 480 LayerIteratorActions::BackToFront> LayerIteratorType; |
| 481 LayerIteratorType end = LayerIteratorType::end(&render_surface_layer_list_); |
| 482 for (LayerIteratorType it = LayerIteratorType::begin( |
| 483 &render_surface_layer_list_); it != end; ++it) { |
| 484 if (!it.representsItself()) |
| 485 continue; |
| 486 state->Append((*it)->AsValue().release()); |
| 487 } |
| 488 return state.PassAs<base::Value>(); |
| 489 } |
| 490 |
475 } // namespace cc | 491 } // namespace cc |
OLD | NEW |