aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTestBatch.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrTestBatch.h')
-rw-r--r--src/gpu/GrTestBatch.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gpu/GrTestBatch.h b/src/gpu/GrTestBatch.h
index aa0c63773e..5e0f107d27 100644
--- a/src/gpu/GrTestBatch.h
+++ b/src/gpu/GrTestBatch.h
@@ -34,17 +34,16 @@ public:
void initBatchTracker(const GrPipelineInfo& init) override {
// Handle any color overrides
- if (init.fColorIgnored) {
+ if (!init.readsColor()) {
this->geoData(0)->fColor = GrColor_ILLEGAL;
- } else if (GrColor_ILLEGAL != init.fOverrideColor) {
- this->geoData(0)->fColor = init.fOverrideColor;
}
+ init.getOverrideColorIfSet(&this->geoData(0)->fColor);
// setup batch properties
- fBatch.fColorIgnored = init.fColorIgnored;
+ fBatch.fColorIgnored = !init.readsColor();
fBatch.fColor = this->geoData(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 {