| Index: cc/trees/layer_tree_host.cc
|
| diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
|
| index 5972a9f8303986a65849be5b35357767753d8066..bbcdee4bd6dbea7ca9a88c8de3799be62bda38a6 100644
|
| --- a/cc/trees/layer_tree_host.cc
|
| +++ b/cc/trees/layer_tree_host.cc
|
| @@ -887,8 +887,12 @@ 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;
|
| @@ -985,6 +989,13 @@ 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() &&
|
| @@ -999,9 +1010,6 @@ 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);
|
|
|