diff options
author | 2011-10-24 12:19:46 +0000 | |
---|---|---|
committer | 2011-10-24 12:19:46 +0000 | |
commit | 045e62d715f5ee9b03deb5af3c750f8318096179 (patch) | |
tree | e16aed890a3a96aff73f66b13de3b079cd638df3 /src/effects/SkLayerRasterizer.cpp | |
parent | 5a0920c22c0dfc62109efdda08ed7e150806e2ff (diff) |
enable soft clipping (yikes)
git-svn-id: http://skia.googlecode.com/svn/trunk@2515 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects/SkLayerRasterizer.cpp')
-rw-r--r-- | src/effects/SkLayerRasterizer.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/effects/SkLayerRasterizer.cpp b/src/effects/SkLayerRasterizer.cpp index 5a7be9d9ab..fd73ffd54e 100644 --- a/src/effects/SkLayerRasterizer.cpp +++ b/src/effects/SkLayerRasterizer.cpp @@ -14,7 +14,7 @@ #include "SkMaskFilter.h" #include "SkPaint.h" #include "SkPath.h" -#include "SkRegion.h" +#include "../core/SkRasterClip.h" #include "SkXfermode.h" #include <new> @@ -107,13 +107,13 @@ bool SkLayerRasterizer::onRasterize(const SkPath& path, const SkMatrix& matrix, } if (SkMask::kJustComputeBounds_CreateMode != mode) { - SkBitmap device; - SkDraw draw; - SkMatrix translatedMatrix; // this translates us to our local pixels - SkMatrix drawMatrix; // this translates the path by each layer's offset - SkRegion rectClip; + SkBitmap device; + SkRasterClip rectClip; + SkDraw draw; + SkMatrix translatedMatrix; // this translates us to our local pixels + SkMatrix drawMatrix; // this translates the path by each layer's offset - rectClip.setRect(0, 0, mask->fBounds.width(), mask->fBounds.height()); + rectClip.setRect(SkIRect::MakeWH(mask->fBounds.width(), mask->fBounds.height())); translatedMatrix = matrix; translatedMatrix.postTranslate(-SkIntToScalar(mask->fBounds.fLeft), @@ -124,7 +124,8 @@ bool SkLayerRasterizer::onRasterize(const SkPath& path, const SkMatrix& matrix, draw.fBitmap = &device; draw.fMatrix = &drawMatrix; - draw.fClip = &rectClip; + draw.fRC = &rectClip; + draw.fClip = &rectClip.bwRgn(); // we set the matrixproc in the loop, as the matrix changes each time (potentially) draw.fBounder = NULL; |