diff options
Diffstat (limited to 'src/gpu/batches')
-rw-r--r-- | src/gpu/batches/GrDefaultPathRenderer.cpp | 6 | ||||
-rw-r--r-- | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/gpu/batches/GrDefaultPathRenderer.cpp b/src/gpu/batches/GrDefaultPathRenderer.cpp index 638e03cb79..8ed3155a68 100644 --- a/src/gpu/batches/GrDefaultPathRenderer.cpp +++ b/src/gpu/batches/GrDefaultPathRenderer.cpp @@ -20,6 +20,7 @@ #include "SkTLazy.h" #include "SkTraceEvent.h" +#include "batches/GrRectBatchFactory.h" #include "batches/GrVertexBatch.h" GrDefaultPathRenderer::GrDefaultPathRenderer(bool separateStencilSupport, @@ -697,7 +698,10 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawTarget* target, } const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? SkMatrix::I() : viewMatrix; - target->drawNonAARect(*pipelineBuilder, color, viewM, bounds, localMatrix); + SkAutoTUnref<GrDrawBatch> batch( + GrRectBatchFactory::CreateNonAAFill(color, viewM, bounds, nullptr, + &localMatrix)); + target->drawBatch(*pipelineBuilder, batch); } else { if (passCount > 1) { pipelineBuilder->setDisableColorXPFactory(); diff --git a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp index 848c82104d..6abe41e997 100644 --- a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp +++ b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp @@ -16,6 +16,7 @@ #include "GrRenderTarget.h" #include "GrResourceProvider.h" #include "GrStrokeInfo.h" +#include "batches/GrRectBatchFactory.h" GrPathRenderer* GrStencilAndCoverPathRenderer::Create(GrResourceProvider* resourceProvider, const GrCaps& caps) { @@ -121,7 +122,11 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) { if (pipelineBuilder->getRenderTarget()->hasMixedSamples()) { pipelineBuilder->disableState(GrPipelineBuilder::kHWAntialias_Flag); } - args.fTarget->drawNonAARect(*pipelineBuilder, args.fColor, viewM, bounds, invert); + + SkAutoTUnref<GrDrawBatch> batch( + GrRectBatchFactory::CreateNonAAFill(args.fColor, viewM, bounds, nullptr, + &invert)); + args.fTarget->drawBatch(*pipelineBuilder, batch); } else { GR_STATIC_CONST_SAME_STENCIL(kStencilPass, kZero_StencilOp, |