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

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: Updated to ToT (past the Great Renaming) 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
« no previous file with comments | « cc/damage_tracker.h ('k') | cc/damage_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/damage_tracker.cc
diff --git a/cc/damage_tracker.cc b/cc/damage_tracker.cc
index b329700247f9b13e879566e247cd8c17a4c0d207..54fa81ad80c5d1acfa3dae549e766fde1a41c320 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 DamageTracker::updateDamageTrackingState(const std::vector<LayerImpl*>& layerList, int targetSurfaceLayerID, bool targetSurfacePropertyChangedOnlyFromDescendant, const IntRect& targetSurfaceContentRect, LayerImpl* targetSurfaceMaskLayer, const WebKit::WebFilterOperations& filters)
+void DamageTracker::updateDamageTrackingState(const std::vector<LayerImpl*>& layerList, int targetSurfaceLayerID, bool targetSurfacePropertyChangedOnlyFromDescendant, const IntRect& targetSurfaceContentRect, LayerImpl* 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 DamageTracker::updateDamageTrackingState(const std::vector<LayerImpl*>& lay
damageRectForThisUpdate.uniteIfNonZero(damageFromSurfaceMask);
damageRectForThisUpdate.uniteIfNonZero(damageFromLeftoverRects);
- if (filters.hasFilterThatMovesPixels())
+ if (filters.hasFilterThatMovesPixels()) {
expandRectWithFilters(damageRectForThisUpdate, filters);
+ } else if (filter) {
+ // 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.
« no previous file with comments | « cc/damage_tracker.h ('k') | cc/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698