diff options
author | 2012-07-20 13:37:06 +0000 | |
---|---|---|
committer | 2012-07-20 13:37:06 +0000 | |
commit | e3d3216fe17b6afb2e613271b5246a2766e12df6 (patch) | |
tree | b5e9b1a72df637677148dd91262d793000ff594c /src/gpu/SkGpuDevice.cpp | |
parent | 426aebc8502654642bebfdda22af8acdae84cf05 (diff) |
Remove stage masks
Review URL: http://codereview.appspot.com/6422047/
git-svn-id: http://skia.googlecode.com/svn/trunk@4688 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/SkGpuDevice.cpp')
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index c8e34408ae..1ef52fb542 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -927,12 +927,8 @@ bool drawWithGPUMaskFilter(GrContext* context, const SkPath& path, context->setRenderTarget(oldRenderTarget); context->setClip(oldClip); - if (grp->hasTextureOrMask()) { - GrMatrix inverse; - if (!matrix.invert(&inverse)) { - return false; - } - grp->preConcatActiveSamplerMatrices(inverse); + if (!grp->preConcatSamplerMatricesWithInverse(matrix)) { + return false; } static const int MASK_IDX = GrPaint::kMaxMasks - 1; @@ -978,11 +974,12 @@ bool drawWithMaskFilter(GrContext* context, const SkPath& path, // we now have a device-aligned 8bit mask in dstM, ready to be drawn using // the current clip (and identity matrix) and grpaint settings - // used to compute inverse view, if necessary - GrMatrix ivm = matrix; - GrContext::AutoMatrix avm(context, GrMatrix::I()); + if (!grp->preConcatSamplerMatricesWithInverse(matrix)) { + return false; + } + GrTextureDesc desc; desc.fWidth = dstM.fBounds.width(); desc.fHeight = dstM.fBounds.height(); @@ -997,10 +994,6 @@ bool drawWithMaskFilter(GrContext* context, const SkPath& path, texture->writePixels(0, 0, desc.fWidth, desc.fHeight, desc.fConfig, dstM.fImage, dstM.fRowBytes); - if (grp->hasTextureOrMask() && ivm.invert(&ivm)) { - grp->preConcatActiveSamplerMatrices(ivm); - } - static const int MASK_IDX = GrPaint::kMaxMasks - 1; // we assume the last mask index is available for use GrAssert(!grp->isMaskStageEnabled(MASK_IDX)); |