diff options
Diffstat (limited to 'src/gpu/GrDrawContext.cpp')
-rw-r--r-- | src/gpu/GrDrawContext.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp index b957b9124e..f7d7e7bb09 100644 --- a/src/gpu/GrDrawContext.cpp +++ b/src/gpu/GrDrawContext.cpp @@ -275,16 +275,17 @@ public: void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides - if (!init.readsColor()) { + if (init.fColorIgnored) { 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.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; } void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { @@ -613,16 +614,17 @@ public: void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides - if (!init.readsColor()) { + if (init.fColorIgnored) { 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.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; } void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { |