Index: src/gpu/GrStencilAndCoverTextContext.cpp |
diff --git a/src/gpu/GrStencilAndCoverTextContext.cpp b/src/gpu/GrStencilAndCoverTextContext.cpp |
index 34319516d52a02166395fe0fc6acb644791a31b0..df13dcf76e143862e16d2289e635340f17b4f1b8 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 "GrGpu.h" |
#include "GrPath.h" |
@@ -435,7 +436,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, |
@@ -483,6 +490,5 @@ void GrStencilAndCoverTextContext::finish() { |
fPipelineBuilder.stencil()->setDisabled(); |
fStateRestore.set(NULL); |
fViewMatrix = fContextInitialMatrix; |
- GrTextContext::finish(); |
} |