Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Unified Diff: src/gpu/GrTestBatch.h

Issue 1213383005: Rework GrPipelineInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixed Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrTessellatingPathRenderer.cpp ('k') | src/gpu/effects/GrConstColorProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTestBatch.h
diff --git a/src/gpu/GrTestBatch.h b/src/gpu/GrTestBatch.h
index aa0c63773e920b4f935aee1b9f224a83065dca4d..5e0f107d273dc727f678ff88ba64409434090f98 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 {
« no previous file with comments | « src/gpu/GrTessellatingPathRenderer.cpp ('k') | src/gpu/effects/GrConstColorProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698