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

Unified Diff: cc/trees/debug_rect_history.cc

Issue 2751783002: cc: Replace LayerIterator with iterator that walks layer list and effect tree (Closed)
Patch Set: Rebase Created 3 years, 8 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/trees/debug_rect_history.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/debug_rect_history.cc
diff --git a/cc/trees/debug_rect_history.cc b/cc/trees/debug_rect_history.cc
index 40afdc85792e9b8a3bc624057c5cf3ac1ee946e7..243c610214ca1ebf654af6c33f94bee7209d71b5 100644
--- a/cc/trees/debug_rect_history.cc
+++ b/cc/trees/debug_rect_history.cc
@@ -9,7 +9,6 @@
#include "base/memory/ptr_util.h"
#include "cc/base/math_util.h"
#include "cc/layers/layer_impl.h"
-#include "cc/layers/layer_iterator.h"
#include "cc/layers/layer_list_iterator.h"
#include "cc/layers/layer_utils.h"
#include "cc/layers/render_surface_impl.h"
@@ -64,7 +63,7 @@ void DebugRectHistory::SaveDebugRectsForCurrentFrame(
SaveScreenSpaceRects(render_surface_layer_list);
if (debug_state.show_layer_animation_bounds_rects)
- SaveLayerAnimationBoundsRects(render_surface_layer_list);
+ SaveLayerAnimationBoundsRects(tree_impl);
}
void DebugRectHistory::SavePaintRects(LayerTreeImpl* tree_impl) {
@@ -217,12 +216,9 @@ void DebugRectHistory::SaveNonFastScrollableRectsCallback(LayerImpl* layer) {
}
}
-void DebugRectHistory::SaveLayerAnimationBoundsRects(
- const LayerImplList& render_surface_layer_list) {
- LayerIterator end = LayerIterator::End(&render_surface_layer_list);
- for (LayerIterator it = LayerIterator::Begin(&render_surface_layer_list);
- it != end; ++it) {
- if (!it.represents_itself())
+void DebugRectHistory::SaveLayerAnimationBoundsRects(LayerTreeImpl* tree_impl) {
+ for (auto it = tree_impl->rbegin(); it != tree_impl->rend(); ++it) {
+ if (!(*it)->is_drawn_render_surface_layer_list_member())
continue;
// TODO(avallee): Figure out if we should show something for a layer who's
« no previous file with comments | « cc/trees/debug_rect_history.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698