Index: cc/debug/debug_rect_history.cc |
diff --git a/cc/debug/debug_rect_history.cc b/cc/debug/debug_rect_history.cc |
index b972b321d8dbecedffc70f07cd95443b43413731..5ce57092f56efcc71f5f6d83434d994c86b2164c 100644 |
--- a/cc/debug/debug_rect_history.cc |
+++ b/cc/debug/debug_rect_history.cc |
@@ -58,6 +58,9 @@ void DebugRectHistory::SaveDebugRectsForCurrentFrame( |
if (debug_state.show_non_occluding_rects) |
SaveNonOccludingRects(non_occluding_screen_space_rects); |
+ |
+ if (debug_state.show_layer_animation_bounds_rects) |
+ SaveLayerAnimationBoundsRects(render_surface_layer_list); |
} |
void DebugRectHistory::SavePaintRects(LayerImpl* layer) { |
@@ -232,4 +235,32 @@ void DebugRectHistory::SaveNonFastScrollableRectsCallback(LayerImpl* layer) { |
} |
} |
+void DebugRectHistory::SaveLayerAnimationBoundsRects( |
+ const LayerImplList& render_surface_layer_list) { |
+ for (int surface_index = render_surface_layer_list.size() - 1; |
danakj
2013/11/28 17:48:56
Why not use LayerIterator?
avallee
2013/12/06 22:08:32
Done. I think we're iterating front to back now in
|
+ surface_index >= 0; |
+ --surface_index) { |
+ LayerImpl* render_surface_layer = render_surface_layer_list[surface_index]; |
+ RenderSurfaceImpl* render_surface = render_surface_layer->render_surface(); |
+ DCHECK(render_surface); |
+ |
+ const LayerImplList& layer_list = render_surface->layer_list(); |
+ for (unsigned layer_index = 0; |
+ layer_index < layer_list.size(); |
+ ++layer_index) { |
+ LayerImpl* layer = layer_list[layer_index]; |
+ |
+ gfx::BoxF inflated_bounds; |
+ if (!layer->GetAnimationBounds(&inflated_bounds)) |
+ continue; |
+ |
+ debug_rects_.push_back(DebugRect(ANIMATION_BOUNDS_RECT_TYPE, |
+ gfx::RectF(inflated_bounds.x(), |
+ inflated_bounds.y(), |
+ inflated_bounds.width(), |
+ inflated_bounds.height()))); |
+ } |
+ } |
+} |
+ |
} // namespace cc |