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

Unified Diff: src/gpu/GrPipeline.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/GrPipeline.h ('k') | src/gpu/GrPrimitiveProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPipeline.cpp
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index 7bdc3000d51cc6d24de19661dfcfd448e00cf6ec..4feddb00ab2e43c6d63a8991e0176288a4265c94 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -30,7 +30,7 @@
overrideColor = colorPOI.inputColorToEffectiveStage();
}
- GrXferProcessor::OptFlags optFlags = GrXferProcessor::kNone_OptFlags;
+ GrXferProcessor::OptFlags optFlags;
if (xferProcessor) {
fXferProcessor.reset(xferProcessor.get());
@@ -39,11 +39,6 @@
pipelineBuilder.getStencil().doesWrite(),
&overrideColor,
caps);
- }
-
- // No need to have an override color if it isn't even going to be used.
- if (SkToBool(GrXferProcessor::kIgnoreColor_OptFlag)) {
- overrideColor = GrColor_ILLEGAL;
}
// When path rendering the stencil settings are not always set on the GrPipelineBuilder
@@ -103,25 +98,13 @@
pipelineBuilder.fCoverageStages[i].processor()->usesLocalCoords();
}
- // Setup info we need to pass to GrPrimitiveProcessors that are used with this GrPipeline.
- fInfoForPrimitiveProcessor.fFlags = 0;
- if (!SkToBool(optFlags & GrXferProcessor::kIgnoreColor_OptFlag)) {
- fInfoForPrimitiveProcessor.fFlags |= GrPipelineInfo::kReadsColor_GrPipelineInfoFlag;
- }
- if (GrColor_ILLEGAL != overrideColor) {
- fInfoForPrimitiveProcessor.fFlags |= GrPipelineInfo::kUseOverrideColor_GrPipelineInfoFlag;
- fInfoForPrimitiveProcessor.fOverrideColor = overrideColor;
- }
- if (!SkToBool(optFlags & GrXferProcessor::kIgnoreCoverage_OptFlag)) {
- fInfoForPrimitiveProcessor.fFlags |= GrPipelineInfo::kReadsCoverage_GrPipelineInfoFlag;
- }
- if (usesLocalCoords) {
- fInfoForPrimitiveProcessor.fFlags |= GrPipelineInfo::kReadsLocalCoords_GrPipelineInfoFlag;
- }
- if (SkToBool(optFlags & GrXferProcessor::kCanTweakAlphaForCoverage_OptFlag)) {
- fInfoForPrimitiveProcessor.fFlags |=
- GrPipelineInfo::kCanTweakAlphaForCoverage_GrPipelineInfoFlag;
- }
+ // let the GP init the batch tracker
+ fInitBT.fColorIgnored = SkToBool(optFlags & GrXferProcessor::kIgnoreColor_OptFlag);
+ fInitBT.fOverrideColor = fInitBT.fColorIgnored ? GrColor_ILLEGAL : overrideColor;
+ fInitBT.fCoverageIgnored = SkToBool(optFlags & GrXferProcessor::kIgnoreCoverage_OptFlag);
+ fInitBT.fUsesLocalCoords = usesLocalCoords;
+ fInitBT.fCanTweakAlphaForCoverage =
+ SkToBool(optFlags & GrXferProcessor::kCanTweakAlphaForCoverage_OptFlag);
}
void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelineBuilder,
« no previous file with comments | « src/gpu/GrPipeline.h ('k') | src/gpu/GrPrimitiveProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698