Index: src/utils/SkGatherPixelRefsAndRects.cpp |
diff --git a/src/utils/SkGatherPixelRefsAndRects.cpp b/src/utils/SkGatherPixelRefsAndRects.cpp |
index f46fe8ed42f0d01a069f8d97abde26f379f0844c..ee5b1472fcaa196aacbcbb2811039395d753a038 100644 |
--- a/src/utils/SkGatherPixelRefsAndRects.cpp |
+++ b/src/utils/SkGatherPixelRefsAndRects.cpp |
@@ -11,15 +11,15 @@ |
void SkPictureUtils::GatherPixelRefsAndRects(SkPicture* pict, |
SkPictureUtils::SkPixelRefContainer* prCont) { |
- if (0 == pict->width() || 0 == pict->height()) { |
+ if (pict->cullRect().isEmpty()) { |
return ; |
} |
- SkGatherPixelRefsAndRectsDevice device(pict->width(), pict->height(), prCont); |
+ SkGatherPixelRefsAndRectsDevice device(SkScalarCeilToInt(pict->cullRect().width()), |
+ SkScalarCeilToInt(pict->cullRect().height()), |
+ prCont); |
SkNoSaveLayerCanvas canvas(&device); |
- canvas.clipRect(SkRect::MakeWH(SkIntToScalar(pict->width()), |
- SkIntToScalar(pict->height())), |
- SkRegion::kIntersect_Op, false); |
+ canvas.clipRect(pict->cullRect(), SkRegion::kIntersect_Op, false); |
canvas.drawPicture(pict); |
} |