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

Unified Diff: include/effects/SkBlurImageFilter.h

Issue 1518643002: SkBlurImageFilter returns input when sigma = 0 (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: clean up Created 5 years 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 | « gm/imagefilters.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkBlurImageFilter.h
diff --git a/include/effects/SkBlurImageFilter.h b/include/effects/SkBlurImageFilter.h
index 7f62634a9eb9b6d58bcc2c72c85d5dae2c2bc527..5ae013d78e789878f0645277faa06e885d1e7fb1 100644
--- a/include/effects/SkBlurImageFilter.h
+++ b/include/effects/SkBlurImageFilter.h
@@ -15,6 +15,9 @@ class SK_API SkBlurImageFilter : public SkImageFilter {
public:
static SkImageFilter* Create(SkScalar sigmaX, SkScalar sigmaY, SkImageFilter* input = NULL,
const CropRect* cropRect = NULL) {
+ if (0 == sigmaX && 0 == sigmaY && nullptr == cropRect) {
+ return SkSafeRef(input);
+ }
return new SkBlurImageFilter(sigmaX, sigmaY, input, cropRect);
}
« no previous file with comments | « gm/imagefilters.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698