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

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 20667002: cc: Add frame data to LTHI tracing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add category thing Created 7 years, 4 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
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/trees/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/animation/keyframed_animation_curve.h" 8 #include "cc/animation/keyframed_animation_curve.h"
9 #include "cc/animation/scrollbar_animation_controller.h" 9 #include "cc/animation/scrollbar_animation_controller.h"
10 #include "cc/debug/traced_value.h" 10 #include "cc/debug/traced_value.h"
(...skipping 22 matching lines...) Expand all
33 min_page_scale_factor_(0), 33 min_page_scale_factor_(0),
34 max_page_scale_factor_(0), 34 max_page_scale_factor_(0),
35 scrolling_layer_id_from_previous_tree_(0), 35 scrolling_layer_id_from_previous_tree_(0),
36 contents_textures_purged_(false), 36 contents_textures_purged_(false),
37 viewport_size_invalid_(false), 37 viewport_size_invalid_(false),
38 needs_update_draw_properties_(true), 38 needs_update_draw_properties_(true),
39 needs_full_tree_sync_(true) { 39 needs_full_tree_sync_(true) {
40 } 40 }
41 41
42 LayerTreeImpl::~LayerTreeImpl() { 42 LayerTreeImpl::~LayerTreeImpl() {
43 TRACE_EVENT_OBJECT_DELETED_WITH_ID(
44 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeImpl", this);
43 // Need to explicitly clear the tree prior to destroying this so that 45 // Need to explicitly clear the tree prior to destroying this so that
44 // the LayerTreeImpl pointer is still valid in the LayerImpl dtor. 46 // the LayerTreeImpl pointer is still valid in the LayerImpl dtor.
45 root_layer_.reset(); 47 root_layer_.reset();
46 } 48 }
47 49
48 static LayerImpl* FindRootScrollLayerRecursive(LayerImpl* layer) { 50 static LayerImpl* FindRootScrollLayerRecursive(LayerImpl* layer) {
49 if (!layer) 51 if (!layer)
50 return NULL; 52 return NULL;
51 53
52 if (layer->scrollable()) 54 if (layer->scrollable())
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 return layer_tree_host_impl_->debug_rect_history(); 504 return layer_tree_host_impl_->debug_rect_history();
503 } 505 }
504 506
505 AnimationRegistrar* LayerTreeImpl::animationRegistrar() const { 507 AnimationRegistrar* LayerTreeImpl::animationRegistrar() const {
506 return layer_tree_host_impl_->animation_registrar(); 508 return layer_tree_host_impl_->animation_registrar();
507 } 509 }
508 510
509 scoped_ptr<base::Value> LayerTreeImpl::AsValue() const { 511 scoped_ptr<base::Value> LayerTreeImpl::AsValue() const {
510 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 512 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
511 TracedValue::MakeDictIntoImplicitSnapshot( 513 TracedValue::MakeDictIntoImplicitSnapshot(
512 state.get(), "cc::LayerTreeImpl", this); 514 TRACE_DISABLED_BY_DEFAULT("cc.debug"), state.get(), "cc::LayerTreeImpl",
515 this);
513 516
514 state->Set("root_layer", root_layer_->AsValue().release()); 517 state->Set("root_layer", root_layer_->AsValue().release());
515 518
516 scoped_ptr<base::ListValue> render_surface_layer_list(new base::ListValue()); 519 scoped_ptr<base::ListValue> render_surface_layer_list(new base::ListValue());
517 typedef LayerIterator<LayerImpl, 520 typedef LayerIterator<LayerImpl,
518 LayerImplList, 521 LayerImplList,
519 RenderSurfaceImpl, 522 RenderSurfaceImpl,
520 LayerIteratorActions::BackToFront> LayerIteratorType; 523 LayerIteratorActions::BackToFront> LayerIteratorType;
521 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_); 524 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_);
522 for (LayerIteratorType it = LayerIteratorType::Begin( 525 for (LayerIteratorType it = LayerIteratorType::Begin(
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest() 634 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest()
632 const { 635 const {
633 // Only the active tree needs to know about layers with copy requests, as 636 // Only the active tree needs to know about layers with copy requests, as
634 // they are aborted if not serviced during draw. 637 // they are aborted if not serviced during draw.
635 DCHECK(IsActiveTree()); 638 DCHECK(IsActiveTree());
636 639
637 return layers_with_copy_output_request_; 640 return layers_with_copy_output_request_;
638 } 641 }
639 642
640 } // namespace cc 643 } // namespace cc
OLDNEW
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698