Index: src/gpu/GrAARectRenderer.cpp |
diff --git a/src/gpu/GrAARectRenderer.cpp b/src/gpu/GrAARectRenderer.cpp |
index b0a0e51a683ff8744652cf2cdafd1a990bbfda7f..1c5b6d8616281379909cf985d5af516c1670488c 100644 |
--- a/src/gpu/GrAARectRenderer.cpp |
+++ b/src/gpu/GrAARectRenderer.cpp |
@@ -76,16 +76,18 @@ |
void initBatchTracker(const GrPipelineInfo& init) override { |
// Handle any color overrides |
- if (!init.readsColor()) { |
- fBatch.fColor = GrColor_ILLEGAL; |
- } |
- init.getOverrideColorIfSet(&fBatch.fColor); |
+ if (init.fColorIgnored) { |
+ fGeoData[0].fColor = GrColor_ILLEGAL; |
+ } else if (GrColor_ILLEGAL != init.fOverrideColor) { |
+ fGeoData[0].fColor = init.fOverrideColor; |
+ } |
// setup batch properties |
- fBatch.fColorIgnored = !init.readsColor(); |
- fBatch.fUsesLocalCoords = init.readsLocalCoords(); |
- fBatch.fCoverageIgnored = !init.readsCoverage(); |
- fBatch.fCanTweakAlphaForCoverage = init.canTweakAlphaForCoverage(); |
+ fBatch.fColorIgnored = init.fColorIgnored; |
+ fBatch.fColor = fGeoData[0].fColor; |
+ fBatch.fUsesLocalCoords = init.fUsesLocalCoords; |
+ fBatch.fCoverageIgnored = init.fCoverageIgnored; |
+ fBatch.fCanTweakAlphaForCoverage = init.fCanTweakAlphaForCoverage; |
} |
void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { |
@@ -422,18 +424,19 @@ |
void initBatchTracker(const GrPipelineInfo& init) override { |
// Handle any color overrides |
- if (!init.readsColor()) { |
+ if (init.fColorIgnored) { |
fGeoData[0].fColor = GrColor_ILLEGAL; |
- } |
- init.getOverrideColorIfSet(&fGeoData[0].fColor); |
+ } else if (GrColor_ILLEGAL != init.fOverrideColor) { |
+ fGeoData[0].fColor = init.fOverrideColor; |
+ } |
// setup batch properties |
- fBatch.fColorIgnored = !init.readsColor(); |
+ fBatch.fColorIgnored = init.fColorIgnored; |
fBatch.fColor = fGeoData[0].fColor; |
- fBatch.fUsesLocalCoords = init.readsLocalCoords(); |
- fBatch.fCoverageIgnored = !init.readsCoverage(); |
+ fBatch.fUsesLocalCoords = init.fUsesLocalCoords; |
+ fBatch.fCoverageIgnored = init.fCoverageIgnored; |
fBatch.fMiterStroke = fGeoData[0].fMiterStroke; |
- fBatch.fCanTweakAlphaForCoverage = init.canTweakAlphaForCoverage(); |
+ fBatch.fCanTweakAlphaForCoverage = init.fCanTweakAlphaForCoverage; |
} |
void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { |