8#ifndef GrProcessorAnalysis_DEFINED
9#define GrProcessorAnalysis_DEFINED
27 : fFlags(opaque ==
Opaque::
kYes ? kIsOpaque_Flag : 0)
34 if (
color.isOpaque()) {
35 fFlags = kColorIsKnown_Flag | kIsOpaque_Flag;
37 fFlags = kColorIsKnown_Flag;
50 if (kColorIsKnown_Flag & fFlags) {
60 if (fFlags != that.fFlags) {
63 return (kColorIsKnown_Flag & fFlags) ? fColor == that.fColor :
true;
70 uint32_t commonFlags =
a.fFlags &
b.fFlags;
71 if ((kColorIsKnown_Flag & commonFlags) &&
a.fColor ==
b.fColor) {
74 }
else if (kIsOpaque_Flag & commonFlags) {
75 result.fFlags = kIsOpaque_Flag;
82 kColorIsKnown_Flag = 0x1,
101 std::unique_ptr<GrFragmentProcessor>
const fps[],
112 return fCompatibleWithCoverageAsAlpha;
140 if (fProcessorsToEliminate > 0) {
141 *newPipelineInputColor = fLastKnownOutputColor;
143 return fProcessorsToEliminate;
150 if (fOutputColorKnown) {
151 return fLastKnownOutputColor;
159 bool fCompatibleWithCoverageAsAlpha;
160 bool fUsesLocalCoords;
161 bool fWillReadDstColor;
162 bool fOutputColorKnown;
163 int fProcessorsToEliminate;
GrProcessorAnalysisCoverage
constexpr SkPMColor4f SK_PMColor4fTRANSPARENT
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
static constexpr bool SkToBool(const T &x)
bool allProcessorsCompatibleWithCoverageAsAlpha() const
bool requiresDstTexture(const GrCaps &caps) const
bool willReadDstColor() const
int initialProcessorsToEliminate(SkPMColor4f *newPipelineInputColor) const
GrProcessorAnalysisColor outputColor() const
bool usesLocalCoords() const
GrColorFragmentProcessorAnalysis()=delete
bool isConstant(SkPMColor4f *color=nullptr) const
GrProcessorAnalysisColor(const SkPMColor4f &color)
void setToConstant(const SkPMColor4f &color)
void setToUnknownOpaque()
bool operator==(const GrProcessorAnalysisColor &that) const
constexpr GrProcessorAnalysisColor(Opaque opaque=Opaque::kNo)
static GrProcessorAnalysisColor Combine(const GrProcessorAnalysisColor &a, const GrProcessorAnalysisColor &b)