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

Unified Diff: src/gpu/GrAARectRenderer.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/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAARectRenderer.cpp
diff --git a/src/gpu/GrAARectRenderer.cpp b/src/gpu/GrAARectRenderer.cpp
index 1c5b6d8616281379909cf985d5af516c1670488c..b0a0e51a683ff8744652cf2cdafd1a990bbfda7f 100644
--- a/src/gpu/GrAARectRenderer.cpp
+++ b/src/gpu/GrAARectRenderer.cpp
@@ -76,18 +76,16 @@ public:
void initBatchTracker(const GrPipelineInfo& init) override {
// Handle any color overrides
- if (init.fColorIgnored) {
- fGeoData[0].fColor = GrColor_ILLEGAL;
- } else if (GrColor_ILLEGAL != init.fOverrideColor) {
- fGeoData[0].fColor = init.fOverrideColor;
+ if (!init.readsColor()) {
+ fBatch.fColor = GrColor_ILLEGAL;
}
+ init.getOverrideColorIfSet(&fBatch.fColor);
// setup batch properties
- fBatch.fColorIgnored = init.fColorIgnored;
- fBatch.fColor = fGeoData[0].fColor;
- fBatch.fUsesLocalCoords = init.fUsesLocalCoords;
- fBatch.fCoverageIgnored = init.fCoverageIgnored;
- fBatch.fCanTweakAlphaForCoverage = init.fCanTweakAlphaForCoverage;
+ fBatch.fColorIgnored = !init.readsColor();
+ fBatch.fUsesLocalCoords = init.readsLocalCoords();
+ fBatch.fCoverageIgnored = !init.readsCoverage();
+ fBatch.fCanTweakAlphaForCoverage = init.canTweakAlphaForCoverage();
}
void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override {
@@ -424,19 +422,18 @@ 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.fUsesLocalCoords = init.fUsesLocalCoords;
- fBatch.fCoverageIgnored = init.fCoverageIgnored;
+ fBatch.fUsesLocalCoords = init.readsLocalCoords();
+ fBatch.fCoverageIgnored = !init.readsCoverage();
fBatch.fMiterStroke = fGeoData[0].fMiterStroke;
- fBatch.fCanTweakAlphaForCoverage = init.fCanTweakAlphaForCoverage;
+ fBatch.fCanTweakAlphaForCoverage = init.canTweakAlphaForCoverage();
}
void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override {
« no previous file with comments | « src/gpu/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698