| Index: src/gpu/GrContext.cpp
|
| diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
|
| index f3212d200ec906007765940222846d45adc0027d..266ed57e13b85980d9129155990c9272e3e4280c 100755
|
| --- a/src/gpu/GrContext.cpp
|
| +++ b/src/gpu/GrContext.cpp
|
| @@ -438,12 +438,20 @@
|
| SkAutoTUnref<const GrGeometryProcessor> gp(
|
| GrDefaultGeoProcFactory::Create(GrDefaultGeoProcFactory::kPosition_GPType,
|
| this->color(),
|
| - this->usesLocalCoords(),
|
| - this->coverageIgnored(),
|
| this->viewMatrix(),
|
| SkMatrix::I()));
|
|
|
| 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);
|
|
|
| size_t vertexStride = gp->getVertexStride();
|
|
|
| @@ -541,7 +549,6 @@
|
| bool colorIgnored() const { return fBatch.fColorIgnored; }
|
| const SkMatrix& viewMatrix() const { return fGeoData[0].fViewMatrix; }
|
| bool hairline() const { return fBatch.fHairline; }
|
| - bool coverageIgnored() const { return fBatch.fCoverageIgnored; }
|
|
|
| bool onCombineIfPossible(GrBatch* t) override {
|
| // StrokeRectBatch* that = t->cast<StrokeRectBatch>();
|
| @@ -705,8 +712,7 @@
|
| int* colorOffset,
|
| int* texOffset,
|
| GrColor color,
|
| - const SkMatrix& viewMatrix,
|
| - bool coverageIgnored) {
|
| + const SkMatrix& viewMatrix) {
|
| *texOffset = -1;
|
| *colorOffset = -1;
|
| uint32_t flags = GrDefaultGeoProcFactory::kPosition_GPType;
|
| @@ -722,8 +728,7 @@
|
| *colorOffset = sizeof(SkPoint);
|
| flags |= GrDefaultGeoProcFactory::kColor_GPType;
|
| }
|
| - return GrDefaultGeoProcFactory::Create(flags, color, hasLocalCoords, coverageIgnored,
|
| - viewMatrix, SkMatrix::I());
|
| + return GrDefaultGeoProcFactory::Create(flags, color, viewMatrix, SkMatrix::I());
|
| }
|
|
|
| class DrawVerticesBatch : public GrBatch {
|
| @@ -781,10 +786,19 @@
|
| int colorOffset = -1, texOffset = -1;
|
| SkAutoTUnref<const GrGeometryProcessor> gp(
|
| set_vertex_attributes(this->hasLocalCoords(), this->hasColors(), &colorOffset,
|
| - &texOffset, this->color(), this->viewMatrix(),
|
| - this->coverageIgnored()));
|
| + &texOffset, this->color(), this->viewMatrix()));
|
|
|
| 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);
|
|
|
| size_t vertexStride = gp->getVertexStride();
|
|
|
| @@ -910,7 +924,6 @@
|
| bool hasLocalCoords() const { return fBatch.fHasLocalCoords; }
|
| int vertexCount() const { return fBatch.fVertexCount; }
|
| int indexCount() const { return fBatch.fIndexCount; }
|
| - bool coverageIgnored() const { return fBatch.fCoverageIgnored; }
|
|
|
| bool onCombineIfPossible(GrBatch* t) override {
|
| DrawVerticesBatch* that = t->cast<DrawVerticesBatch>();
|
|
|