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

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

Issue 183563003: cc: Clean up OcclusionTracker template parameters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: occlusionparams: Created 6 years, 9 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/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.cc » ('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/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 982
983 void LayerTreeHost::PaintLayerContents( 983 void LayerTreeHost::PaintLayerContents(
984 const RenderSurfaceLayerList& render_surface_layer_list, 984 const RenderSurfaceLayerList& render_surface_layer_list,
985 ResourceUpdateQueue* queue, 985 ResourceUpdateQueue* queue,
986 bool* did_paint_content, 986 bool* did_paint_content,
987 bool* need_more_updates) { 987 bool* need_more_updates) {
988 bool record_metrics_for_frame = 988 bool record_metrics_for_frame =
989 settings_.show_overdraw_in_tracing && 989 settings_.show_overdraw_in_tracing &&
990 base::debug::TraceLog::GetInstance() && 990 base::debug::TraceLog::GetInstance() &&
991 base::debug::TraceLog::GetInstance()->IsEnabled(); 991 base::debug::TraceLog::GetInstance()->IsEnabled();
992 OcclusionTracker occlusion_tracker( 992 OcclusionTracker<Layer> occlusion_tracker(
993 root_layer_->render_surface()->content_rect(), record_metrics_for_frame); 993 root_layer_->render_surface()->content_rect(), record_metrics_for_frame);
994 occlusion_tracker.set_minimum_tracking_size( 994 occlusion_tracker.set_minimum_tracking_size(
995 settings_.minimum_occlusion_tracking_size); 995 settings_.minimum_occlusion_tracking_size);
996 996
997 PrioritizeTextures(render_surface_layer_list, 997 PrioritizeTextures(render_surface_layer_list,
998 occlusion_tracker.overdraw_metrics()); 998 occlusion_tracker.overdraw_metrics());
999 999
1000 in_paint_layer_contents_ = true; 1000 in_paint_layer_contents_ = true;
1001 1001
1002 // Iterates front-to-back to allow for testing occlusion and performing 1002 // Iterates front-to-back to allow for testing occlusion and performing
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 swap_promise_list_.push_back(swap_promise.Pass()); 1312 swap_promise_list_.push_back(swap_promise.Pass());
1313 } 1313 }
1314 1314
1315 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { 1315 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
1316 for (size_t i = 0; i < swap_promise_list_.size(); i++) 1316 for (size_t i = 0; i < swap_promise_list_.size(); i++)
1317 swap_promise_list_[i]->DidNotSwap(reason); 1317 swap_promise_list_[i]->DidNotSwap(reason);
1318 swap_promise_list_.clear(); 1318 swap_promise_list_.clear();
1319 } 1319 }
1320 1320
1321 } // namespace cc 1321 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698