OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/debug/debug_rect_history.h" | 5 #include "cc/debug/debug_rect_history.h" |
6 | 6 |
7 #include "cc/base/math_util.h" | 7 #include "cc/base/math_util.h" |
8 #include "cc/layers/layer_impl.h" | 8 #include "cc/layers/layer_impl.h" |
9 #include "cc/trees/damage_tracker.h" | 9 #include "cc/trees/damage_tracker.h" |
10 #include "cc/trees/layer_tree_host.h" | 10 #include "cc/trees/layer_tree_host.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 LayerImpl* render_surface_layer = render_surface_layer_list[surface_index]; | 80 LayerImpl* render_surface_layer = render_surface_layer_list[surface_index]; |
81 RenderSurfaceImpl* render_surface = render_surface_layer->render_surface(); | 81 RenderSurfaceImpl* render_surface = render_surface_layer->render_surface(); |
82 DCHECK(render_surface); | 82 DCHECK(render_surface); |
83 | 83 |
84 const std::vector<LayerImpl*>& layer_list = render_surface->layer_list(); | 84 const std::vector<LayerImpl*>& layer_list = render_surface->layer_list(); |
85 for (unsigned layer_index = 0; | 85 for (unsigned layer_index = 0; |
86 layer_index < layer_list.size(); | 86 layer_index < layer_list.size(); |
87 ++layer_index) { | 87 ++layer_index) { |
88 LayerImpl* layer = layer_list[layer_index]; | 88 LayerImpl* layer = layer_list[layer_index]; |
89 | 89 |
90 if (LayerTreeHostCommon::renderSurfaceContributesToTarget<LayerImpl>( | 90 if (LayerTreeHostCommon::RenderSurfaceContributesToTarget<LayerImpl>( |
91 layer, render_surface_layer->id())) | 91 layer, render_surface_layer->id())) |
92 continue; | 92 continue; |
93 | 93 |
94 if (layer->LayerIsAlwaysDamaged()) | 94 if (layer->LayerIsAlwaysDamaged()) |
95 continue; | 95 continue; |
96 | 96 |
97 if (layer->LayerPropertyChanged() || | 97 if (layer->LayerPropertyChanged() || |
98 layer->LayerSurfacePropertyChanged()) { | 98 layer->LayerSurfacePropertyChanged()) { |
99 debug_rects_.push_back( | 99 debug_rects_.push_back( |
100 DebugRect(PROPERTY_CHANGED_RECT_TYPE, | 100 DebugRect(PROPERTY_CHANGED_RECT_TYPE, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 void DebugRectHistory::SaveNonOccludingRects( | 156 void DebugRectHistory::SaveNonOccludingRects( |
157 const std::vector<gfx::Rect>& non_occluding_rects) { | 157 const std::vector<gfx::Rect>& non_occluding_rects) { |
158 for (size_t i = 0; i < non_occluding_rects.size(); ++i) { | 158 for (size_t i = 0; i < non_occluding_rects.size(); ++i) { |
159 debug_rects_.push_back( | 159 debug_rects_.push_back( |
160 DebugRect(NONOCCLUDING_RECT_TYPE, non_occluding_rects[i])); | 160 DebugRect(NONOCCLUDING_RECT_TYPE, non_occluding_rects[i])); |
161 } | 161 } |
162 } | 162 } |
163 | 163 |
164 } // namespace cc | 164 } // namespace cc |
OLD | NEW |