aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrCoverageSetOpXP.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-02-22 11:52:03 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-22 19:41:30 +0000
commit5298dc8bf30f580f551d130346c007efaf4b2098 (patch)
treeea8df60caf9add5e08f06bdd6615f67307256f23 /src/gpu/effects/GrCoverageSetOpXP.cpp
parent3661bc997620899695041010a750d11dbe8a972d (diff)
Make GrPipelineAnalysis a nested class of GrProcessorSet.
It is renamed to FragmentProcessorAnalysis since it represents the outputs of the final FPs. It now stores the analysis results that are subsequently needed rather than exposing GrProcOptInfo. GrProcOptInfo is now only used on color FPs (not coverage). Miscellaneous related renamings. Change-Id: I95c518a7a76df6dc294a9fa67c611f8f653247bc Reviewed-on: https://skia-review.googlesource.com/8534 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/effects/GrCoverageSetOpXP.cpp')
-rw-r--r--src/gpu/effects/GrCoverageSetOpXP.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/gpu/effects/GrCoverageSetOpXP.cpp b/src/gpu/effects/GrCoverageSetOpXP.cpp
index 9cf994f07a..d8eb0d950f 100644
--- a/src/gpu/effects/GrCoverageSetOpXP.cpp
+++ b/src/gpu/effects/GrCoverageSetOpXP.cpp
@@ -34,7 +34,7 @@ public:
private:
CoverageSetOpXP(SkRegion::Op regionOp, bool fInvertCoverage);
- GrXferProcessor::OptFlags onGetOptimizations(const GrPipelineAnalysis& analysis,
+ GrXferProcessor::OptFlags onGetOptimizations(const FragmentProcessorAnalysis& analysis,
bool doesStencilWrite,
GrColor* color,
const GrCaps& caps) const override;
@@ -107,10 +107,11 @@ GrGLSLXferProcessor* CoverageSetOpXP::createGLSLInstance() const {
return new GLCoverageSetOpXP(*this);
}
-GrXferProcessor::OptFlags CoverageSetOpXP::onGetOptimizations(const GrPipelineAnalysis& analysis,
- bool doesStencilWrite,
- GrColor* color,
- const GrCaps& caps) const {
+GrXferProcessor::OptFlags CoverageSetOpXP::onGetOptimizations(
+ const FragmentProcessorAnalysis& analysis,
+ bool doesStencilWrite,
+ GrColor* color,
+ const GrCaps& caps) const {
// We never look at the color input
return GrXferProcessor::kIgnoreColor_OptFlag;
}
@@ -167,7 +168,7 @@ public:
bool invertCoverage() const { return fInvertCoverage; }
private:
- GrXferProcessor::OptFlags onGetOptimizations(const GrPipelineAnalysis&, bool, GrColor*,
+ GrXferProcessor::OptFlags onGetOptimizations(const FragmentProcessorAnalysis&, bool, GrColor*,
const GrCaps&) const override {
// We never look at the color input
return GrXferProcessor::kIgnoreColor_OptFlag;
@@ -321,10 +322,11 @@ const GrXPFactory* GrCoverageSetOpXPFactory::Get(SkRegion::Op regionOp, bool inv
return nullptr;
}
-GrXferProcessor* GrCoverageSetOpXPFactory::onCreateXferProcessor(const GrCaps& caps,
- const GrPipelineAnalysis& analysis,
- bool hasMixedSamples,
- const DstTexture* dst) const {
+GrXferProcessor* GrCoverageSetOpXPFactory::onCreateXferProcessor(
+ const GrCaps& caps,
+ const FragmentProcessorAnalysis& analysis,
+ bool hasMixedSamples,
+ const DstTexture* dst) const {
// We don't support inverting coverage with mixed samples. We don't expect to ever want this in
// the future, however we could at some point make this work using an inverted coverage
// modulation table. Note that an inverted table still won't work if there are coverage procs.
@@ -333,7 +335,7 @@ GrXferProcessor* GrCoverageSetOpXPFactory::onCreateXferProcessor(const GrCaps& c
return nullptr;
}
- if (analysis.fUsesPLSDstRead) {
+ if (analysis.usesPLSDstRead()) {
return new ShaderCSOXferProcessor(dst, hasMixedSamples, fRegionOp, fInvertCoverage);
}
return CoverageSetOpXP::Create(fRegionOp, fInvertCoverage);