From 5298dc8bf30f580f551d130346c007efaf4b2098 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Wed, 22 Feb 2017 11:52:03 -0500 Subject: 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 Commit-Queue: Brian Salomon --- src/gpu/effects/GrCoverageSetOpXP.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src/gpu/effects/GrCoverageSetOpXP.cpp') 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); -- cgit v1.2.3