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

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

Issue 12760011: cc: Chromify LayerTreeHostCommon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/tiled_layer_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 "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/layers/render_surface_impl.h" 9 #include "cc/layers/render_surface_impl.h"
10 #include "cc/trees/layer_tree_host_common.h" 10 #include "cc/trees/layer_tree_host_common.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 gfx::RectF DamageTracker::TrackDamageFromActiveLayers( 184 gfx::RectF DamageTracker::TrackDamageFromActiveLayers(
185 const std::vector<LayerImpl*>& layer_list, 185 const std::vector<LayerImpl*>& layer_list,
186 int target_surface_layer_id) { 186 int target_surface_layer_id) {
187 gfx::RectF damage_rect = gfx::RectF(); 187 gfx::RectF damage_rect = gfx::RectF();
188 188
189 for (unsigned layerIndex = 0; layerIndex < layer_list.size(); ++layerIndex) { 189 for (unsigned layerIndex = 0; layerIndex < layer_list.size(); ++layerIndex) {
190 // Visit layers in back-to-front order. 190 // Visit layers in back-to-front order.
191 LayerImpl* layer = layer_list[layerIndex]; 191 LayerImpl* layer = layer_list[layerIndex];
192 192
193 if (LayerTreeHostCommon::renderSurfaceContributesToTarget<LayerImpl>( 193 if (LayerTreeHostCommon::RenderSurfaceContributesToTarget<LayerImpl>(
194 layer, target_surface_layer_id)) 194 layer, target_surface_layer_id))
195 ExtendDamageForRenderSurface(layer, &damage_rect); 195 ExtendDamageForRenderSurface(layer, &damage_rect);
196 else 196 else
197 ExtendDamageForLayer(layer, &damage_rect); 197 ExtendDamageForLayer(layer, &damage_rect);
198 } 198 }
199 199
200 return damage_rect; 200 return damage_rect;
201 } 201 }
202 202
203 gfx::RectF DamageTracker::TrackDamageFromSurfaceMask( 203 gfx::RectF DamageTracker::TrackDamageFromSurfaceMask(
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 // one in them. This means we need to redraw any pixels in the surface being 384 // one in them. This means we need to redraw any pixels in the surface being
385 // used for the blur in this layer this frame. 385 // used for the blur in this layer this frame.
386 if (layer->background_filters().hasFilterThatMovesPixels()) { 386 if (layer->background_filters().hasFilterThatMovesPixels()) {
387 ExpandDamageRectInsideRectWithFilters(target_damage_rect, 387 ExpandDamageRectInsideRectWithFilters(target_damage_rect,
388 surface_rect_in_target_space, 388 surface_rect_in_target_space,
389 layer->background_filters()); 389 layer->background_filters());
390 } 390 }
391 } 391 }
392 392
393 } // namespace cc 393 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer_unittest.cc ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698