aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrSWMaskHelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrSWMaskHelper.cpp')
-rw-r--r--src/gpu/GrSWMaskHelper.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index fc34591fcd..0fab55c361 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -191,6 +191,7 @@ void GrSWMaskHelper::DrawToTargetWithPathMask(GrTexture* texture,
if (!avmr.setIdentity(drawState)) {
return;
}
+ GrDrawState::AutoRestoreEffects are(drawState);
enum {
// the SW path renderer shares this stage with glyph
// rendering (kGlyphMaskStage in GrTextContext)
@@ -213,13 +214,11 @@ void GrSWMaskHelper::DrawToTargetWithPathMask(GrTexture* texture,
maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop));
maskMatrix.preConcat(drawState->getViewMatrix());
- GrAssert(!drawState->isStageEnabled(kPathMaskStage));
- drawState->setEffect(kPathMaskStage,
+ drawState->addCoverageEffect(
GrSimpleTextureEffect::Create(texture,
maskMatrix,
false,
GrEffect::kPosition_CoordsType))->unref();
target->drawSimpleRect(dstRect);
- drawState->disableStage(kPathMaskStage);
}