Make GrColorFragmentProcessorAnalysis do all analysis in constructor.
We no longer do piecemeal analysis. This simplifies the change to make FPs have unique ownership.
Change-Id: I4e6b2c23b4277b612dedfc466cee74630a30e997
Reviewed-on: https://skia-review.googlesource.com/25362
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrProcessorSet.cpp b/src/gpu/GrProcessorSet.cpp
index c476f64..21e5fc3 100644
--- a/src/gpu/GrProcessorSet.cpp
+++ b/src/gpu/GrProcessorSet.cpp
@@ -153,13 +153,11 @@
SkASSERT(!fFragmentProcessorOffset);
GrProcessorSet::Analysis analysis;
-
- const GrFragmentProcessor* clipFP = clip ? clip->clipCoverageFragmentProcessor() : nullptr;
- GrColorFragmentProcessorAnalysis colorAnalysis(colorInput);
analysis.fCompatibleWithCoverageAsAlpha = GrProcessorAnalysisCoverage::kLCD != coverageInput;
+ const GrFragmentProcessor* clipFP = clip ? clip->clipCoverageFragmentProcessor() : nullptr;
const GrFragmentProcessor* const* fps = fFragmentProcessors.get() + fFragmentProcessorOffset;
- colorAnalysis.analyzeProcessors(fps, fColorFragmentProcessorCnt);
+ GrColorFragmentProcessorAnalysis colorAnalysis(colorInput, fps, fColorFragmentProcessorCnt);
analysis.fCompatibleWithCoverageAsAlpha &=
colorAnalysis.allProcessorsCompatibleWithCoverageAsAlpha();
fps += fColorFragmentProcessorCnt;