Index: src/gpu/GrDefaultPathRenderer.cpp |
diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp |
index 9258bfb1d83f2fc09950d8432aab0021d9058ff1..fe38f1f3cbc8eceef88abd5ff7df1dbbf57da451 100644 |
--- a/src/gpu/GrDefaultPathRenderer.cpp |
+++ b/src/gpu/GrDefaultPathRenderer.cpp |
@@ -250,14 +250,19 @@ public: |
} |
void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { |
- SkAutoTUnref<const GrGeometryProcessor> gp( |
- GrDefaultGeoProcFactory::Create(GrDefaultGeoProcFactory::kPosition_GPType, |
- this->color(), |
- this->usesLocalCoords(), |
- this->coverageIgnored(), |
- this->viewMatrix(), |
- SkMatrix::I(), |
- this->coverage())); |
+ SkAutoTUnref<const GrGeometryProcessor> gp; |
+ { |
+ using namespace GrDefaultGeoProcFactory; |
+ Color color(this->color()); |
+ Coverage coverage(this->coverage()); |
+ if (this->coverageIgnored()) { |
+ coverage.fType = Coverage::kNone_Type; |
+ } |
+ LocalCoords localCoords(this->usesLocalCoords() ? LocalCoords::kUsePosition_Type : |
+ LocalCoords::kUnused_Type); |
+ gp.reset(GrDefaultGeoProcFactory::Create(color, coverage, localCoords, |
+ this->viewMatrix())); |
+ } |
size_t vertexStride = gp->getVertexStride(); |
SkASSERT(vertexStride == sizeof(SkPoint)); |