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

Unified Diff: src/gpu/GrStencilAndCoverTextContext.cpp

Issue 732693002: Drawstate on stack (Closed) Base URL: https://skia.googlesource.com/skia.git@real_def_gp
Patch Set: tiny fix Created 6 years, 1 month 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/GrStencilAndCoverTextContext.h ('k') | src/gpu/GrTest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrStencilAndCoverTextContext.cpp
diff --git a/src/gpu/GrStencilAndCoverTextContext.cpp b/src/gpu/GrStencilAndCoverTextContext.cpp
index 14a14a0474d9e840648f6c28b76e12c4c004fa31..d70593e0e31f313545291536fb19a0dc21a81e2d 100644
--- a/src/gpu/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/GrStencilAndCoverTextContext.cpp
@@ -333,10 +333,9 @@ void GrStencilAndCoverTextContext::init(const GrPaint& paint,
&fGlyphCache->getDescriptor(), gpuStroke);
}
- fStateRestore.set(fDrawTarget->drawState());
+ fStateRestore.set(&fDrawState);
- fDrawTarget->drawState()->setFromPaint(fPaint, fContext->getMatrix(),
- fContext->getRenderTarget());
+ fDrawState.setFromPaint(fPaint, fContext->getMatrix(), fContext->getRenderTarget());
GR_STATIC_CONST_SAME_STENCIL(kStencilPass,
kZero_StencilOp,
@@ -346,7 +345,7 @@ void GrStencilAndCoverTextContext::init(const GrPaint& paint,
0x0000,
0xffff);
- *fDrawTarget->drawState()->stencil() = kStencilPass;
+ *fDrawState.stencil() = kStencilPass;
SkASSERT(0 == fPendingGlyphCount);
}
@@ -368,7 +367,7 @@ void GrStencilAndCoverTextContext::flush() {
return;
}
- fDrawTarget->drawPaths(fGlyphs, fIndexBuffer, fPendingGlyphCount, fTransformBuffer,
+ fDrawTarget->drawPaths(&fDrawState, fGlyphs, fIndexBuffer, fPendingGlyphCount, fTransformBuffer,
GrPathRendering::kTranslate_PathTransformType,
GrPathRendering::kWinding_FillType);
@@ -384,7 +383,7 @@ void GrStencilAndCoverTextContext::finish() {
SkGlyphCache::AttachCache(fGlyphCache);
fGlyphCache = NULL;
- fDrawTarget->drawState()->stencil()->setDisabled();
+ fDrawState.stencil()->setDisabled();
fStateRestore.set(NULL);
fContext->setMatrix(fContextInitialMatrix);
GrTextContext::finish();
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.h ('k') | src/gpu/GrTest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698