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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 156603005: cc: Clean up iterator template to only take 1 parameter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iteratorcleanup: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/render_surface_impl.h ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index bbcdee4bd6dbea7ca9a88c8de3799be62bda38a6..5972a9f8303986a65849be5b35357767753d8066 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -887,12 +887,8 @@ void LayerTreeHost::SetPrioritiesForSurfaces(size_t surface_memory_bytes) {
void LayerTreeHost::SetPrioritiesForLayers(
const RenderSurfaceLayerList& update_list) {
- typedef LayerIterator<Layer,
- RenderSurfaceLayerList,
- RenderSurface,
- LayerIteratorActions::FrontToBack> LayerIteratorType;
-
PriorityCalculator calculator;
+ typedef LayerIterator<Layer> LayerIteratorType;
LayerIteratorType end = LayerIteratorType::End(&update_list);
for (LayerIteratorType it = LayerIteratorType::Begin(&update_list);
it != end;
@@ -989,13 +985,6 @@ void LayerTreeHost::PaintLayerContents(
ResourceUpdateQueue* queue,
bool* did_paint_content,
bool* need_more_updates) {
- // Use FrontToBack to allow for testing occlusion and performing culling
- // during the tree walk.
- typedef LayerIterator<Layer,
- RenderSurfaceLayerList,
- RenderSurface,
- LayerIteratorActions::FrontToBack> LayerIteratorType;
-
bool record_metrics_for_frame =
settings_.show_overdraw_in_tracing &&
base::debug::TraceLog::GetInstance() &&
@@ -1010,6 +999,9 @@ void LayerTreeHost::PaintLayerContents(
in_paint_layer_contents_ = true;
+ // Iterates front-to-back to allow for testing occlusion and performing
+ // culling during the tree walk.
+ typedef LayerIterator<Layer> LayerIteratorType;
LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list);
for (LayerIteratorType it =
LayerIteratorType::Begin(&render_surface_layer_list);
« no previous file with comments | « cc/layers/render_surface_impl.h ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698