diff options
Diffstat (limited to 'src/gpu/GrDefaultPathRenderer.cpp')
-rw-r--r-- | src/gpu/GrDefaultPathRenderer.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp index 1be5ce7939..7659847ecc 100644 --- a/src/gpu/GrDefaultPathRenderer.cpp +++ b/src/gpu/GrDefaultPathRenderer.cpp @@ -254,6 +254,8 @@ public: SkAutoTUnref<const GrGeometryProcessor> gp( GrDefaultGeoProcFactory::Create(GrDefaultGeoProcFactory::kPosition_GPType, this->color(), + this->usesLocalCoords(), + this->coverageIgnored(), this->viewMatrix(), SkMatrix::I(), this->coverage())); @@ -263,16 +265,6 @@ public: batchTarget->initDraw(gp, pipeline); - // TODO this is hacky, but the only way we have to initialize the GP is to use the - // GrPipelineInfo struct so we can generate the correct shader. Once we have GrBatch - // everywhere we can remove this nastiness - GrPipelineInfo init; - init.fColorIgnored = fBatch.fColorIgnored; - init.fOverrideColor = GrColor_ILLEGAL; - init.fCoverageIgnored = fBatch.fCoverageIgnored; - init.fUsesLocalCoords = this->usesLocalCoords(); - gp->initBatchTracker(batchTarget->currentBatchTracker(), init); - int instanceCount = fGeoData.count(); // compute number of vertices @@ -518,6 +510,7 @@ private: bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; } const SkMatrix& viewMatrix() const { return fBatch.fViewMatrix; } bool isHairline() const { return fBatch.fIsHairline; } + bool coverageIgnored() const { return fBatch.fCoverageIgnored; } struct BatchTracker { GrColor fColor; |