Index: src/effects/SkLayerRasterizer.cpp |
diff --git a/src/effects/SkLayerRasterizer.cpp b/src/effects/SkLayerRasterizer.cpp |
index 8403d06147a602969aeb8c5f5d1af00a3fe062f5..d3e112c3a4b836118be46258c5f3d1b9fb181ab3 100644 |
--- a/src/effects/SkLayerRasterizer.cpp |
+++ b/src/effects/SkLayerRasterizer.cpp |
@@ -116,12 +116,9 @@ |
} |
if (SkMask::kJustComputeBounds_CreateMode != mode) { |
+ SkBitmap device; |
+ SkRasterClip rectClip; |
SkDraw draw; |
- if (!draw.fDst.reset(*mask)) { |
- return false; |
- } |
- |
- SkRasterClip rectClip; |
SkMatrix translatedMatrix; // this translates us to our local pixels |
SkMatrix drawMatrix; // this translates the path by each layer's offset |
@@ -131,6 +128,9 @@ |
translatedMatrix.postTranslate(-SkIntToScalar(mask->fBounds.fLeft), |
-SkIntToScalar(mask->fBounds.fTop)); |
+ device.installMaskPixels(*mask); |
+ |
+ draw.fBitmap = &device; |
draw.fMatrix = &drawMatrix; |
draw.fRC = &rectClip; |
draw.fClip = &rectClip.bwRgn(); |