Chromium Code Reviews| Index: cc/damage_tracker.cc |
| diff --git a/cc/damage_tracker.cc b/cc/damage_tracker.cc |
| index b907e3e5edeec06dd112ac237b0809e6f5052e62..9dbd72fcfc0950a0f549c86eff56d80fc83122c2 100644 |
| --- a/cc/damage_tracker.cc |
| +++ b/cc/damage_tracker.cc |
| @@ -51,7 +51,7 @@ static inline void expandDamageRectInsideRectWithFilters(FloatRect& damageRect, |
| damageRect.unite(expandedDamageRect); |
| } |
| -void CCDamageTracker::updateDamageTrackingState(const std::vector<CCLayerImpl*>& layerList, int targetSurfaceLayerID, bool targetSurfacePropertyChangedOnlyFromDescendant, const IntRect& targetSurfaceContentRect, CCLayerImpl* targetSurfaceMaskLayer, const WebKit::WebFilterOperations& filters) |
| +void CCDamageTracker::updateDamageTrackingState(const std::vector<CCLayerImpl*>& layerList, int targetSurfaceLayerID, bool targetSurfacePropertyChangedOnlyFromDescendant, const IntRect& targetSurfaceContentRect, CCLayerImpl* targetSurfaceMaskLayer, const WebKit::WebFilterOperations& filters, SkImageFilter* filter) |
| { |
| // |
| // This function computes the "damage rect" of a target surface, and updates the state |
| @@ -134,8 +134,13 @@ void CCDamageTracker::updateDamageTrackingState(const std::vector<CCLayerImpl*>& |
| damageRectForThisUpdate.uniteIfNonZero(damageFromSurfaceMask); |
| damageRectForThisUpdate.uniteIfNonZero(damageFromLeftoverRects); |
| - if (filters.hasFilterThatMovesPixels()) |
| + if (filters.hasFilterThatMovesPixels()) { |
| expandRectWithFilters(damageRectForThisUpdate, filters); |
| + } else if (filter) { |
|
jamesr
2012/10/22 19:14:17
Why is this "else"? should we DCHECK() that we don
Stephen White
2012/10/22 20:11:20
Yeah, I'll do that. The damage tracker is probably
danakj
2012/10/22 20:12:46
Can you please also do it in LayerImpl?
Stephen White
2012/10/22 21:13:56
Done.
|
| + // TODO(senorblanco): Once SkImageFilter reports its outsets, use |
| + // those here to limit damage. |
| + damageRectForThisUpdate = targetSurfaceContentRect; |
| + } |
| } |
| // Damage accumulates until we are notified that we actually did draw on that frame. |