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

Unified Diff: src/gpu/GrReducedClip.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/effects/SkBlurMaskFilter.cpp ('k') | src/utils/SkGatherPixelRefsAndRects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrReducedClip.cpp
diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp
index 3040b463137bce1d137f2149aac7d6013c3f75ab..ca97098794d91058da93ec1dc2576eed5cdb46fc 100644
--- a/src/gpu/GrReducedClip.cpp
+++ b/src/gpu/GrReducedClip.cpp
@@ -409,7 +409,10 @@ void GrReducedClip::ReduceClipStack(const SkClipStack& stack,
if (tighterBounds) {
SkIRect stackIBounds;
stackBounds.roundOut(&stackIBounds);
- tighterBounds->intersect(queryBounds, stackIBounds);
+ if (!tighterBounds->intersect(queryBounds, stackIBounds)) {
+ SkASSERT(0);
+ tighterBounds->setEmpty();
+ }
bounds = tighterBounds;
}
} else {
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/utils/SkGatherPixelRefsAndRects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698