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

Unified Diff: src/effects/SkBlurMaskFilter.cpp

Issue 833943002: It is dangerous to ignore SkRect::intersect's return value (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update Created 5 years, 12 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 | « src/core/SkScan_AntiPath.cpp ('k') | src/gpu/GrReducedClip.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurMaskFilter.cpp
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index aa576697e3a8c85779b5864c409af4b22ddcb587..97ae436367bdd33909e177b8f4245864d7ed0ba9 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -1184,7 +1184,9 @@ bool SkBlurMaskFilterImpl::canFilterMaskGPU(const SkRect& srcBounds,
// Outset srcRect and clipRect by 3 * sigma, to compute affected blur area.
srcRect.outset(sigma3, sigma3);
clipRect.outset(sigma3, sigma3);
- srcRect.intersect(clipRect);
+ if (!srcRect.intersect(clipRect)) {
+ srcRect.setEmpty();
+ }
*maskRect = srcRect;
return true;
}
« no previous file with comments | « src/core/SkScan_AntiPath.cpp ('k') | src/gpu/GrReducedClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698