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

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

Issue 411693004: Only Record Ugliness Histogram for Compositor Side Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments and use a bool Created 6 years, 5 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
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | no next file » | 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/trees/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <set> 8 #include <set>
9 9
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 sent_page_scale_delta_(1), 83 sent_page_scale_delta_(1),
84 min_page_scale_factor_(0), 84 min_page_scale_factor_(0),
85 max_page_scale_factor_(0), 85 max_page_scale_factor_(0),
86 scrolling_layer_id_from_previous_tree_(0), 86 scrolling_layer_id_from_previous_tree_(0),
87 contents_textures_purged_(false), 87 contents_textures_purged_(false),
88 requires_high_res_to_draw_(false), 88 requires_high_res_to_draw_(false),
89 viewport_size_invalid_(false), 89 viewport_size_invalid_(false),
90 needs_update_draw_properties_(true), 90 needs_update_draw_properties_(true),
91 needs_full_tree_sync_(true), 91 needs_full_tree_sync_(true),
92 next_activation_forces_redraw_(false), 92 next_activation_forces_redraw_(false),
93 has_ever_been_drawn_(false),
93 render_surface_layer_list_id_(0) { 94 render_surface_layer_list_id_(0) {
94 } 95 }
95 96
96 LayerTreeImpl::~LayerTreeImpl() { 97 LayerTreeImpl::~LayerTreeImpl() {
97 BreakSwapPromises(SwapPromise::SWAP_FAILS); 98 BreakSwapPromises(SwapPromise::SWAP_FAILS);
98 99
99 // Need to explicitly clear the tree prior to destroying this so that 100 // Need to explicitly clear the tree prior to destroying this so that
100 // the LayerTreeImpl pointer is still valid in the LayerImpl dtor. 101 // the LayerTreeImpl pointer is still valid in the LayerImpl dtor.
101 DCHECK(!root_layer_); 102 DCHECK(!root_layer_);
102 DCHECK(layers_with_copy_output_request_.empty()); 103 DCHECK(layers_with_copy_output_request_.empty());
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 target_tree->SetViewportSizeInvalid(); 231 target_tree->SetViewportSizeInvalid();
231 else 232 else
232 target_tree->ResetViewportSizeInvalid(); 233 target_tree->ResetViewportSizeInvalid();
233 234
234 if (hud_layer()) 235 if (hud_layer())
235 target_tree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>( 236 target_tree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>(
236 LayerTreeHostCommon::FindLayerInSubtree( 237 LayerTreeHostCommon::FindLayerInSubtree(
237 target_tree->root_layer(), hud_layer()->id()))); 238 target_tree->root_layer(), hud_layer()->id())));
238 else 239 else
239 target_tree->set_hud_layer(NULL); 240 target_tree->set_hud_layer(NULL);
241
242 target_tree->has_ever_been_drawn_ = false;
240 } 243 }
241 244
242 LayerImpl* LayerTreeImpl::InnerViewportContainerLayer() const { 245 LayerImpl* LayerTreeImpl::InnerViewportContainerLayer() const {
243 return inner_viewport_scroll_layer_ 246 return inner_viewport_scroll_layer_
244 ? inner_viewport_scroll_layer_->scroll_clip_layer() 247 ? inner_viewport_scroll_layer_->scroll_clip_layer()
245 : NULL; 248 : NULL;
246 } 249 }
247 250
248 LayerImpl* LayerTreeImpl::CurrentlyScrollingLayer() const { 251 LayerImpl* LayerTreeImpl::CurrentlyScrollingLayer() const {
249 DCHECK(IsActiveTree()); 252 DCHECK(IsActiveTree());
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 1378
1376 void LayerTreeImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 1379 void LayerTreeImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
1377 layer_tree_host_impl_->UnregisterPictureLayerImpl(layer); 1380 layer_tree_host_impl_->UnregisterPictureLayerImpl(layer);
1378 } 1381 }
1379 1382
1380 void LayerTreeImpl::InputScrollAnimationFinished() { 1383 void LayerTreeImpl::InputScrollAnimationFinished() {
1381 layer_tree_host_impl_->ScrollEnd(); 1384 layer_tree_host_impl_->ScrollEnd();
1382 } 1385 }
1383 1386
1384 } // namespace cc 1387 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698