Index: src/gpu/GrStencilAndCoverTextContext.cpp |
diff --git a/src/gpu/GrStencilAndCoverTextContext.cpp b/src/gpu/GrStencilAndCoverTextContext.cpp |
index 63efcfcd850ecd78420b94b04899e8f879504de8..539d73174382432dfa5e76320791807d49a088a3 100644 |
--- a/src/gpu/GrStencilAndCoverTextContext.cpp |
+++ b/src/gpu/GrStencilAndCoverTextContext.cpp |
@@ -7,6 +7,7 @@ |
#include "GrStencilAndCoverTextContext.h" |
#include "GrAtlasTextContext.h" |
+#include "GrDrawContext.h" |
#include "GrDrawTarget.h" |
#include "GrPath.h" |
#include "GrPathRange.h" |
@@ -434,7 +435,13 @@ void GrStencilAndCoverTextContext::flush() { |
SkAutoTUnref<GrPathProcessor> pp(GrPathProcessor::Create(fPaint.getColor(), |
fViewMatrix, |
fLocalMatrix)); |
- fDrawTarget->drawPaths(&fPipelineBuilder, pp, fGlyphs, |
+ |
+ GrDrawContext* drawContext = fContext->drawContext(); |
+ if (!drawContext) { |
+ return; |
+ } |
+ |
+ drawContext->drawPaths(&fPipelineBuilder, pp, fGlyphs, |
fGlyphIndices, GrPathRange::kU16_PathIndexType, |
get_xy_scalar_array(fGlyphPositions), |
GrPathRendering::kTranslate_PathTransformType, |
@@ -482,6 +489,5 @@ void GrStencilAndCoverTextContext::finish() { |
fPipelineBuilder.stencil()->setDisabled(); |
fStateRestore.set(NULL); |
fViewMatrix = fContextInitialMatrix; |
- GrTextContext::finish(); |
} |