Index: src/core/SkDraw.cpp |
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp |
index 24fc9064a6dd092a91301d3608834fb9256f9b87..f615b83d1678f2fd9bae249df34e4ecbd4264ced 100644 |
--- a/src/core/SkDraw.cpp |
+++ b/src/core/SkDraw.cpp |
@@ -1488,19 +1488,14 @@ public: |
} while (!clipper.done()); |
} |
} else { |
- SkIRect storage; |
- SkIRect* bounds = &mask.fBounds; |
- |
- // this extra test is worth it, assuming that most of the time it succeeds |
- // since we can avoid writing to storage |
- if (!fClipBounds.containsNoEmptyCheck(mask.fBounds)) { |
- if (!storage.intersectNoEmptyCheck(mask.fBounds, fClipBounds)) |
- return; |
- bounds = &storage; |
+ SkIRect storage; |
+ if (mask.fBounds.isEmpty() || |
reed1
2016/06/17 10:39:42
I wonder
1. if it would be clearer to put this e
|
+ !storage.intersectNoEmptyCheck(mask.fBounds, fClipBounds)) { |
+ return; |
} |
if (this->getImageData(glyph, &mask)) { |
- this->blitMask(mask, *bounds); |
+ this->blitMask(mask, storage); |
} |
} |
} |