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

Side by Side Diff: cc/trees/damage_tracker.cc

Issue 2716733007: cc: Rename LayerImpl::render_surface to GetRenderSurface (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « cc/layers/render_surface_unittest.cc ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/layers/render_surface_unittest.cc ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698