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: safe refcnt 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
« bench/BlurImageFilterBench.cpp ('K') | « 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..a5acc692fc552e468b03e017ee42a05ac34a98cc 100644
--- a/include/effects/SkBlurImageFilter.h
+++ b/include/effects/SkBlurImageFilter.h
@@ -15,6 +15,10 @@ 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) {
+ SkSafeRef(input);
+ return input;
reed1 2015/12/10 19:41:17 or return SkSafeRef(input);
+ }
return new SkBlurImageFilter(sigmaX, sigmaY, input, cropRect);
}
« bench/BlurImageFilterBench.cpp ('K') | « gm/imagefilters.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698