aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrStencilAndCoverTextContext.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-05-26 11:38:03 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-26 11:38:03 -0700
commitea4615034498aca2f9ca1753fb9a1ef10508d8cc (patch)
tree22f0027849de0dd18b199fb13c6c28be812cf229 /src/gpu/GrStencilAndCoverTextContext.cpp
parent884e97cb04db7ed053a866567ee9c6e4c01f993a (diff)
Split drawing functionality out of GrContext and into new GrDrawContext
This is mainly a mechanical CL. There were some fiddly bits in GrContext.cpp where it no longer had access to the GrDrawTarget (and had to use the new GrDrawContext). I've converted GrAARectRenderer & GrOvalRenderer into static classes so I could stop allocating them. Review URL: https://codereview.chromium.org/1151283004
Diffstat (limited to 'src/gpu/GrStencilAndCoverTextContext.cpp')
-rw-r--r--src/gpu/GrStencilAndCoverTextContext.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gpu/GrStencilAndCoverTextContext.cpp b/src/gpu/GrStencilAndCoverTextContext.cpp
index 63efcfcd85..539d731743 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();
}