Index: src/gpu/GrDrawContext.cpp |
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp |
index f7d7e7bb099c4fce1e61c17f91083e573ff94d46..b957b9124e88f492c1d02deaf7665244300ea976 100644 |
--- a/src/gpu/GrDrawContext.cpp |
+++ b/src/gpu/GrDrawContext.cpp |
@@ -275,17 +275,16 @@ public: |
void initBatchTracker(const GrPipelineInfo& init) override { |
// Handle any color overrides |
- if (init.fColorIgnored) { |
+ if (!init.readsColor()) { |
fGeoData[0].fColor = GrColor_ILLEGAL; |
- } else if (GrColor_ILLEGAL != init.fOverrideColor) { |
- fGeoData[0].fColor = init.fOverrideColor; |
} |
+ init.getOverrideColorIfSet(&fGeoData[0].fColor); |
// setup batch properties |
- fBatch.fColorIgnored = init.fColorIgnored; |
+ fBatch.fColorIgnored = !init.readsColor(); |
fBatch.fColor = fGeoData[0].fColor; |
- fBatch.fUsesLocalCoords = init.fUsesLocalCoords; |
- fBatch.fCoverageIgnored = init.fCoverageIgnored; |
+ fBatch.fUsesLocalCoords = init.readsLocalCoords(); |
+ fBatch.fCoverageIgnored = !init.readsCoverage(); |
} |
void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { |
@@ -614,17 +613,16 @@ public: |
void initBatchTracker(const GrPipelineInfo& init) override { |
// Handle any color overrides |
- if (init.fColorIgnored) { |
+ if (!init.readsColor()) { |
fGeoData[0].fColor = GrColor_ILLEGAL; |
- } else if (GrColor_ILLEGAL != init.fOverrideColor) { |
- fGeoData[0].fColor = init.fOverrideColor; |
} |
+ init.getOverrideColorIfSet(&fGeoData[0].fColor); |
// setup batch properties |
- fBatch.fColorIgnored = init.fColorIgnored; |
+ fBatch.fColorIgnored = !init.readsColor(); |
fBatch.fColor = fGeoData[0].fColor; |
- fBatch.fUsesLocalCoords = init.fUsesLocalCoords; |
- fBatch.fCoverageIgnored = init.fCoverageIgnored; |
+ fBatch.fUsesLocalCoords = init.readsLocalCoords(); |
+ fBatch.fCoverageIgnored = !init.readsCoverage(); |
} |
void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { |