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

Unified Diff: third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp

Issue 1862733002: Remove all use of crop edges from SkImageFilter::CropRect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update to ToT Created 4 years, 8 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 | « third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp b/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp
index 3c4448004c871e75ab4517c96f11987c6f3e9f5c..06ffe78407bcc50068b3cc8fc7a35d173f941737 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp
+++ b/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp
@@ -221,19 +221,9 @@ SkImageFilter::CropRect FilterEffect::getCropRect() const
FloatRect rect = filterPrimitiveSubregion();
rect.scale(getFilter()->scale());
return SkImageFilter::CropRect(rect);
+ } else {
+ return SkImageFilter::CropRect(SkRect::MakeEmpty(), 0);
}
-
- uint32_t flags = 0;
- FloatRect rect = applyEffectBoundaries(rect);
-
- rect.scale(getFilter()->scale());
-
- flags |= hasX() ? SkImageFilter::CropRect::kHasLeft_CropEdge : 0;
- flags |= hasY() ? SkImageFilter::CropRect::kHasTop_CropEdge : 0;
- flags |= hasWidth() ? SkImageFilter::CropRect::kHasWidth_CropEdge : 0;
- flags |= hasHeight() ? SkImageFilter::CropRect::kHasHeight_CropEdge : 0;
-
- return SkImageFilter::CropRect(rect, flags);
}
static int getImageFilterIndex(ColorSpace colorSpace, bool requiresPMColorValidation)
« no previous file with comments | « third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698