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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 1213013003: Revert of Rework GrPipelineInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrImmediateDrawTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawContext.cpp
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index b957b9124e88f492c1d02deaf7665244300ea976..f7d7e7bb099c4fce1e61c17f91083e573ff94d46 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -275,16 +275,17 @@
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;
}
void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override {
@@ -613,16 +614,17 @@
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;
}
void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override {
« no previous file with comments | « src/gpu/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrImmediateDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698