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

Unified Diff: src/gpu/GrPathProcessor.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/GrOvalRenderer.cpp ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPathProcessor.cpp
diff --git a/src/gpu/GrPathProcessor.cpp b/src/gpu/GrPathProcessor.cpp
index b47fa6a97387c646a5d95ad4e40fb8eb42c637ef..d10c4662e9583bf97955b4ff5c70eadc766de1d1 100644
--- a/src/gpu/GrPathProcessor.cpp
+++ b/src/gpu/GrPathProcessor.cpp
@@ -32,17 +32,18 @@ void GrPathProcessor::getInvariantOutputCoverage(GrInitInvariantOutput* out) con
void GrPathProcessor::initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const {
PathBatchTracker* local = bt->cast<PathBatchTracker>();
- if (init.fColorIgnored) {
+ if (!init.readsColor()) {
local->fInputColorType = kIgnored_GrGPInput;
local->fColor = GrColor_ILLEGAL;
} else {
local->fInputColorType = kUniform_GrGPInput;
- local->fColor = GrColor_ILLEGAL == init.fOverrideColor ? this->color() :
- init.fOverrideColor;
+ if (!init.getOverrideColorIfSet(&local->fColor)) {
+ local->fColor = this->color();
+ }
}
- local->fInputCoverageType = init.fCoverageIgnored ? kIgnored_GrGPInput : kAllOnes_GrGPInput;
- local->fUsesLocalCoords = init.fUsesLocalCoords;
+ local->fInputCoverageType = init.readsCoverage() ? kAllOnes_GrGPInput : kIgnored_GrGPInput;
+ local->fUsesLocalCoords = init.readsLocalCoords();
}
bool GrPathProcessor::canMakeEqual(const GrBatchTracker& m,
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698