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

Unified Diff: src/gpu/GrStencilAndCoverTextContext.cpp

Issue 1151283004: Split drawing functionality out of GrContext and into new GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-GPU builds Created 5 years, 7 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/GrStencilAndCoverPathRenderer.cpp ('k') | src/gpu/GrTest.cpp » ('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 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();
}
« no previous file with comments | « src/gpu/GrStencilAndCoverPathRenderer.cpp ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698