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

Unified Diff: src/gpu/GrOvalRenderer.cpp

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/GrInOrderDrawBuffer.cpp ('k') | src/gpu/GrPathProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOvalRenderer.cpp
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp
index a429caba1125dcd39635f2ffea9504b8717f304e..57e53b69d6b0f5119887897ee0c1eef2a13b85d9 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -661,18 +661,17 @@ public:
void initBatchTracker(const GrPipelineInfo& init) override {
// Handle any color overrides
- if (init.fColorIgnored) {
+ if (!init.readsColor()) {
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.fColorIgnored;
+ fBatch.fColorIgnored = !init.readsColor();
fBatch.fColor = fGeoData[0].fColor;
fBatch.fStroke = fGeoData[0].fStroke;
- fBatch.fUsesLocalCoords = init.fUsesLocalCoords;
- fBatch.fCoverageIgnored = init.fCoverageIgnored;
+ fBatch.fUsesLocalCoords = init.readsLocalCoords();
+ fBatch.fCoverageIgnored = !init.readsCoverage();
}
void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override {
@@ -876,18 +875,17 @@ public:
void initBatchTracker(const GrPipelineInfo& init) override {
// Handle any color overrides
- if (init.fColorIgnored) {
+ if (!init.readsCoverage()) {
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.fColorIgnored;
+ fBatch.fColorIgnored = !init.readsColor();
fBatch.fColor = fGeoData[0].fColor;
fBatch.fStroke = fGeoData[0].fStroke;
- fBatch.fUsesLocalCoords = init.fUsesLocalCoords;
- fBatch.fCoverageIgnored = init.fCoverageIgnored;
+ fBatch.fUsesLocalCoords = init.readsLocalCoords();
+ fBatch.fCoverageIgnored = !init.readsCoverage();
}
void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override {
@@ -1140,18 +1138,17 @@ public:
void initBatchTracker(const GrPipelineInfo& init) override {
// Handle any color overrides
- if (init.fColorIgnored) {
+ if (!init.readsColor()) {
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.fColorIgnored;
+ fBatch.fColorIgnored = !init.readsColor();
fBatch.fColor = fGeoData[0].fColor;
fBatch.fMode = fGeoData[0].fMode;
- fBatch.fUsesLocalCoords = init.fUsesLocalCoords;
- fBatch.fCoverageIgnored = init.fCoverageIgnored;
+ fBatch.fUsesLocalCoords = init.readsLocalCoords();
+ fBatch.fCoverageIgnored = !init.readsCoverage();
}
void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override {
@@ -1489,18 +1486,17 @@ public:
void initBatchTracker(const GrPipelineInfo& init) override {
// Handle any color overrides
- if (init.fColorIgnored) {
+ if (!init.readsColor()) {
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.fColorIgnored;
+ fBatch.fColorIgnored = !init.readsColor();
fBatch.fColor = fGeoData[0].fColor;
fBatch.fStroke = fGeoData[0].fStroke;
- fBatch.fUsesLocalCoords = init.fUsesLocalCoords;
- fBatch.fCoverageIgnored = init.fCoverageIgnored;
+ fBatch.fUsesLocalCoords = init.readsLocalCoords();
+ fBatch.fCoverageIgnored = !init.readsCoverage();
}
void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override {
@@ -1662,18 +1658,17 @@ public:
void initBatchTracker(const GrPipelineInfo& init) override {
// Handle any color overrides
- if (init.fColorIgnored) {
+ if (!init.readsColor()) {
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.fColorIgnored;
+ fBatch.fColorIgnored = !init.readsColor();
fBatch.fColor = fGeoData[0].fColor;
fBatch.fStroke = fGeoData[0].fStroke;
- 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/GrInOrderDrawBuffer.cpp ('k') | src/gpu/GrPathProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698