OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/damage_tracker.h" | 5 #include "cc/trees/damage_tracker.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 for (size_t layer_index = 0; layer_index < layer_list.size(); ++layer_index) { | 185 for (size_t layer_index = 0; layer_index < layer_list.size(); ++layer_index) { |
186 // Visit layers in back-to-front order. | 186 // Visit layers in back-to-front order. |
187 LayerImpl* layer = layer_list[layer_index]; | 187 LayerImpl* layer = layer_list[layer_index]; |
188 | 188 |
189 // We skip damage from the HUD layer because (a) the HUD layer damages the | 189 // We skip damage from the HUD layer because (a) the HUD layer damages the |
190 // whole frame and (b) we don't want HUD layer damage to be shown by the | 190 // whole frame and (b) we don't want HUD layer damage to be shown by the |
191 // HUD damage rect visualization. | 191 // HUD damage rect visualization. |
192 if (layer == layer->layer_tree_impl()->hud_layer()) | 192 if (layer == layer->layer_tree_impl()->hud_layer()) |
193 continue; | 193 continue; |
194 | 194 |
195 RenderSurfaceImpl* render_surface = layer->render_surface(); | 195 RenderSurfaceImpl* render_surface = layer->GetRenderSurface(); |
196 if (render_surface && render_surface != target_surface) | 196 if (render_surface && render_surface != target_surface) |
197 ExtendDamageForRenderSurface(render_surface, &damage); | 197 ExtendDamageForRenderSurface(render_surface, &damage); |
198 else | 198 else |
199 ExtendDamageForLayer(layer, &damage); | 199 ExtendDamageForLayer(layer, &damage); |
200 } | 200 } |
201 | 201 |
202 return damage; | 202 return damage; |
203 } | 203 } |
204 | 204 |
205 DamageTracker::DamageAccumulator DamageTracker::TrackDamageFromSurfaceMask( | 205 DamageTracker::DamageAccumulator DamageTracker::TrackDamageFromSurfaceMask( |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 } | 439 } |
440 | 440 |
441 rect->set_x(x_); | 441 rect->set_x(x_); |
442 rect->set_y(y_); | 442 rect->set_y(y_); |
443 rect->set_width(width.ValueOrDie()); | 443 rect->set_width(width.ValueOrDie()); |
444 rect->set_height(height.ValueOrDie()); | 444 rect->set_height(height.ValueOrDie()); |
445 return true; | 445 return true; |
446 } | 446 } |
447 | 447 |
448 } // namespace cc | 448 } // namespace cc |
OLD | NEW |