Remove early-out from color analysis pass.
This early-out was a useful optimization when the passed-in count could
be large, but the analysis pass only takes 1-2 inputs nowadays, so it
doesn't add value. (Even if we did have a lot of inputs, most of the
checks in this loop correspond directly to a flag-bit check on an FP;
they aren't expensive either way.)
Also, did some minor polish/variable renaming for readability.
Change-Id: I556db3269fd2f1781b4b0ff26a252ba4c76a1d4b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415378
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrProcessorAnalysis.h b/src/gpu/GrProcessorAnalysis.h
index 11a6de3..8762ec1 100644
--- a/src/gpu/GrProcessorAnalysis.h
+++ b/src/gpu/GrProcessorAnalysis.h
@@ -96,7 +96,7 @@
GrColorFragmentProcessorAnalysis(const GrProcessorAnalysisColor& input,
std::unique_ptr<GrFragmentProcessor> const fps[],
- int cnt);
+ int count);
bool isOpaque() const { return fIsOpaque; }
@@ -134,7 +134,7 @@
* Provides known information about the last processor's output color.
*/
GrProcessorAnalysisColor outputColor() const {
- if (fKnowOutputColor) {
+ if (fOutputColorKnown) {
return fLastKnownOutputColor;
}
return fIsOpaque ? GrProcessorAnalysisColor::Opaque::kYes
@@ -145,7 +145,7 @@
bool fIsOpaque;
bool fCompatibleWithCoverageAsAlpha;
bool fUsesLocalCoords;
- bool fKnowOutputColor;
+ bool fOutputColorKnown;
int fProcessorsToEliminate;
SkPMColor4f fLastKnownOutputColor;
};