Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: src/gpu/GrSWMaskHelper.cpp

Issue 16952006: Replace fixed-size array of effect stages in GrDrawState with two appendable arrays, one for color,… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix comments Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrSWMaskHelper.cpp
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index fc34591fcd30422e5a3a99cb6ef3648e55d547ab..0fab55c361e7196fd271ff4f62b6b4df999fac51 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);
}
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698