Late creation of GrPathProcessor
BUG=skia:
Review URL: https://codereview.chromium.org/1337513002
diff --git a/src/gpu/GrStencilAndCoverTextContext.cpp b/src/gpu/GrStencilAndCoverTextContext.cpp
index 7325f15..fbd32fc 100644
--- a/src/gpu/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/GrStencilAndCoverTextContext.cpp
@@ -427,9 +427,6 @@
void GrStencilAndCoverTextContext::flush(GrDrawContext* dc) {
if (fDraw) {
SkASSERT(fDraw->count());
- SkAutoTUnref<GrPathProcessor> pp(GrPathProcessor::Create(fPaint.getColor(),
- fViewMatrix,
- fLocalMatrix));
// We should only be flushing about once every run. However, if this impacts performance
// we could move the creation of the GrPipelineBuilder earlier.
@@ -447,7 +444,8 @@
*pipelineBuilder.stencil() = kStencilPass;
- dc->drawPathsFromRange(&pipelineBuilder, pp, fDraw, GrPathRendering::kWinding_FillType);
+ dc->drawPathsFromRange(&pipelineBuilder, fViewMatrix, fLocalMatrix, fPaint.getColor(),
+ fDraw, GrPathRendering::kWinding_FillType);
fDraw->unref();
fDraw = nullptr;
}