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

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: 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
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();
}

Powered by Google App Engine
This is Rietveld 408576698