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

Unified Diff: cc/trees/damage_tracker.cc

Issue 2099743002: cc: Move background filters to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ' Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/damage_tracker.h ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/damage_tracker.cc
diff --git a/cc/trees/damage_tracker.cc b/cc/trees/damage_tracker.cc
index 73e60f584ebff5819abd2d8b97e748e0c73ce96c..0f0eacd40d9a9f9997691a88fa7885a18c42518e 100644
--- a/cc/trees/damage_tracker.cc
+++ b/cc/trees/damage_tracker.cc
@@ -196,7 +196,7 @@ gfx::Rect DamageTracker::TrackDamageFromActiveLayers(
continue;
if (layer->render_surface() && layer->render_surface() != target_surface)
- ExtendDamageForRenderSurface(layer, &damage_rect);
+ ExtendDamageForRenderSurface(layer->render_surface(), &damage_rect);
else
ExtendDamageForLayer(layer, &damage_rect);
}
@@ -343,7 +343,7 @@ void DamageTracker::ExtendDamageForLayer(LayerImpl* layer,
}
void DamageTracker::ExtendDamageForRenderSurface(
- LayerImpl* layer,
+ RenderSurfaceImpl* render_surface,
gfx::Rect* target_damage_rect) {
// There are two ways a "descendant surface" can damage regions of the "target
// surface":
@@ -360,10 +360,9 @@ void DamageTracker::ExtendDamageForRenderSurface(
// as well, and that damage should propagate to the target surface.
//
- RenderSurfaceImpl* render_surface = layer->render_surface();
-
bool surface_is_new = false;
- SurfaceRectMapData& data = RectDataForSurface(layer->id(), &surface_is_new);
+ SurfaceRectMapData& data =
+ RectDataForSurface(render_surface->OwningLayerId(), &surface_is_new);
gfx::Rect old_surface_rect = data.rect_;
// The drawableContextRect() already includes the replica if it exists.
@@ -428,10 +427,11 @@ void DamageTracker::ExtendDamageForRenderSurface(
// those pixels from the surface with only the contents of layers below this
// one in them. This means we need to redraw any pixels in the surface being
// used for the blur in this layer this frame.
- if (layer->background_filters().HasFilterThatMovesPixels()) {
- ExpandDamageRectInsideRectWithFilters(target_damage_rect,
- surface_rect_in_target_space,
- layer->background_filters());
+ const FilterOperations& background_filters =
+ render_surface->BackgroundFilters();
+ if (background_filters.HasFilterThatMovesPixels()) {
+ ExpandDamageRectInsideRectWithFilters(
+ target_damage_rect, surface_rect_in_target_space, background_filters);
}
}
« no previous file with comments | « cc/trees/damage_tracker.h ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698