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

Unified Diff: cc/damage_tracker.cc

Issue 11175009: Implement SkImageFilter support in the compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add damage tracker test, fix braces, include order. Created 8 years, 2 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
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.

Powered by Google App Engine
This is Rietveld 408576698