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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layer_tree_impl.h ('k') | cc/picture_layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« 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