Index: src/utils/SkGatherPixelRefsAndRects.h |
diff --git a/src/utils/SkGatherPixelRefsAndRects.h b/src/utils/SkGatherPixelRefsAndRects.h |
index 6e11fbe6d58a350f1c8008187a4114f0d3e96d6e..9589c3ea3852ba8a5fb2ffeccc13d47823c9186b 100644 |
--- a/src/utils/SkGatherPixelRefsAndRects.h |
+++ b/src/utils/SkGatherPixelRefsAndRects.h |
@@ -79,8 +79,9 @@ protected: |
SkRect mappedRect; |
draw.fMatrix->mapRect(&mappedRect, rect); |
SkRect clipRect = SkRect::Make(draw.fRC->getBounds()); |
- mappedRect.intersect(clipRect); |
- fPRCont->add(bm.pixelRef(), mappedRect); |
+ if (mappedRect.intersect(clipRect)) { |
+ fPRCont->add(bm.pixelRef(), mappedRect); |
+ } |
} |
} |
virtual void drawOval(const SkDraw& draw, const SkRect& rect, |