aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProcessorSet.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-03-28 16:32:05 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-29 13:17:50 +0000
commit318538484f99253b6a2acf97d4d1b420e628b289 (patch)
treea698f31af79a873f16bad8847c50623bb44a19be /src/gpu/GrProcessorSet.h
parent02bb6df0819d932a7a7ef8c6fb6914e3c5a0f4a2 (diff)
Remove GrXferProcessor::getOptimizations.
This replaces GrXferProcessor::getOptimizations with a new function on GrXPFactory. The results are made available via FragmentProcessorAnalysis. Bug: skia: Change-Id: I535985458c9d13ad858cac94e957e2fdbe332036 Reviewed-on: https://skia-review.googlesource.com/10218 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrProcessorSet.h')
-rw-r--r--src/gpu/GrProcessorSet.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/gpu/GrProcessorSet.h b/src/gpu/GrProcessorSet.h
index bfad769a18..e584a94709 100644
--- a/src/gpu/GrProcessorSet.h
+++ b/src/gpu/GrProcessorSet.h
@@ -79,13 +79,16 @@ public:
: fIsInitializedWithProcessorSet(false)
, fCompatibleWithCoverageAsAlpha(true)
, fValidInputColor(false)
+ , fRequiresDstTexture(false)
+ , fCanCombineOverlappedStencilAndCover(true)
+ , fIgnoresInputColor(false)
, fOutputCoverageType(static_cast<unsigned>(GrPipelineAnalysisCoverage::kNone))
, fOutputColorType(static_cast<unsigned>(ColorType::kUnknown))
, fInitialColorProcessorsToEliminate(0) {}
- // This version is used by a unit test that assumes no clip, no processors, and no PLS.
+ // This version is used by a unit test that assumes no clip and no fragment processors.
FragmentProcessorAnalysis(const GrPipelineAnalysisColor&, GrPipelineAnalysisCoverage,
- const GrCaps&);
+ const GrXPFactory*, const GrCaps&);
void init(const GrPipelineAnalysisColor&, GrPipelineAnalysisCoverage, const GrProcessorSet&,
const GrAppliedClip*, const GrCaps&);
@@ -119,7 +122,12 @@ public:
}
bool usesLocalCoords() const { return fUsesLocalCoords; }
+ bool requiresDstTexture() const { return fRequiresDstTexture; }
+ bool canCombineOverlappedStencilAndCover() const {
+ return fCanCombineOverlappedStencilAndCover;
+ }
bool isCompatibleWithCoverageAsAlpha() const { return fCompatibleWithCoverageAsAlpha; }
+ bool isInputColorIgnored() const { return fIgnoresInputColor; }
bool isOutputColorOpaque() const {
return ColorType::kOpaque == this->outputColorType() ||
ColorType::kOpaqueConstant == this->outputColorType();
@@ -154,11 +162,17 @@ public:
PackedBool fUsesLocalCoords : 1;
PackedBool fCompatibleWithCoverageAsAlpha : 1;
PackedBool fValidInputColor : 1;
+ PackedBool fRequiresDstTexture : 1;
+ PackedBool fCanCombineOverlappedStencilAndCover : 1;
+ // These could be removed if we created the XP from the XPFactory when doing analysis.
+ PackedBool fIgnoresInputColor : 1;
unsigned fOutputCoverageType : 2;
unsigned fOutputColorType : 2;
- unsigned fInitialColorProcessorsToEliminate : 32 - 8;
+
+ unsigned fInitialColorProcessorsToEliminate : 32 - 11;
GrColor fInputColor;
+ // This could be removed if we created the XP from the XPFactory when doing analysis.
GrColor fKnownOutputColor;
friend class GrProcessorSet;