26 fColorFragmentProcessor = std::move(
paint.fColorFragmentProcessor);
27 fCoverageFragmentProcessor = std::move(
paint.fCoverageFragmentProcessor);
37 fColorFragmentProcessor = std::move(colorFP);
41 : fColorFragmentProcessor(
std::move(that.fColorFragmentProcessor))
42 , fCoverageFragmentProcessor(
std::move(that.fCoverageFragmentProcessor))
43 , fXP(
std::move(that.fXP))
52#if defined(GR_TEST_UTILS)
53SkString GrProcessorSet::dumpProcessors()
const {
56 result.
append(
"Color Fragment Processor:\n");
59 result.
append(
"No color fragment processor.\n");
62 result.
append(
"Coverage Fragment Processor:\n");
65 result.
append(
"No coverage fragment processors.\n");
68 result.
append(
"Xfer Processor: ");
72 result.
append(
"SrcOver\n");
75 result.append(
"XP Factory dumping not implemented.\n");
84 if (((fFlags ^ that.fFlags) & ~kFinalized_Flag) ||
127 bool coverageUsesLocalCoords =
false;
129 if (!fCoverageFragmentProcessor->compatibleWithCoverageAsAlpha()) {
130 analysis.fCompatibleWithCoverageAsAlpha =
false;
132 coverageUsesLocalCoords |= fCoverageFragmentProcessor->usesSampleCoords();
134 if (
clip &&
clip->hasCoverageFragmentProcessor()) {
135 hasCoverageFP =
true;
141 analysis.fInputColorType =
static_cast<Analysis::PackedInputColorType
>(
142 colorFPsToEliminate ? Analysis::kOverridden_InputColorType
143 : Analysis::kOriginal_InputColorType);
155 this->xpFactory(), colorAnalysis.
outputColor(), outputCoverage, caps, clampType);
158 analysis.fCompatibleWithCoverageAsAlpha &=
160 analysis.fRequiresNonOverlappingDraws =
162 analysis.fRequiresDstTexture;
163 analysis.fUsesNonCoherentHWBlending =
165 analysis.fUnaffectedByDstValue =
169 analysis.fInputColorType =
170 static_cast<Analysis::PackedInputColorType
>(Analysis::kIgnored_InputColorType);
171 analysis.fUsesLocalCoords = coverageUsesLocalCoords;
173 analysis.fCompatibleWithCoverageAsAlpha &=
175 analysis.fUsesLocalCoords = coverageUsesLocalCoords || colorAnalysis.
usesLocalCoords();
177 if (colorFPsToEliminate) {
179 fColorFragmentProcessor =
nullptr;
184 outputCoverage, caps, clampType);
185 fXP.fProcessor = xp.release();
187 fFlags |= kFinalized_Flag;
188 analysis.fIsInitialized =
true;
190 bool hasXferBarrier =
193 bool needsNonOverlappingDraws = analysis.fRequiresDstTexture || hasXferBarrier;
194 SkASSERT(analysis.fRequiresNonOverlappingDraws == needsNonOverlappingDraws);
201 fColorFragmentProcessor->visitProxies(func);
204 fCoverageFragmentProcessor->visitProxies(func);
GrProcessorAnalysisCoverage
std::function< void(GrSurfaceProxy *, skgpu::Mipmapped)> GrVisitProxyFunc
@ kNone_GrXferBarrierType
static SkPathRef * gEmpty
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
static constexpr bool SkToBool(const T &x)
bool allProcessorsCompatibleWithCoverageAsAlpha() const
bool requiresDstTexture(const GrCaps &caps) const
int initialProcessorsToEliminate(SkPMColor4f *newPipelineInputColor) const
GrProcessorAnalysisColor outputColor() const
bool usesLocalCoords() const
bool usesSampleCoords() const
bool compatibleWithCoverageAsAlpha() const
static const GrXferProcessor & SimpleSrcOverXP()
const GrFragmentProcessor * coverageFragmentProcessor() const
bool hasCoverageFragmentProcessor() const
void visitProxies(const GrVisitProxyFunc &) const
bool hasColorFragmentProcessor() const
GrProcessorSet(GrPaint &&)
static const GrProcessorSet & EmptySet()
Analysis finalize(const GrProcessorAnalysisColor &, const GrProcessorAnalysisCoverage, const GrAppliedClip *, const GrUserStencilSettings *, const GrCaps &, GrClampType, SkPMColor4f *inputColorOverride)
bool operator==(const GrProcessorSet &that) const
const GrFragmentProcessor * colorFragmentProcessor() const
const GrXferProcessor * xferProcessor() const
static GrProcessorSet MakeEmptySet()
@ kCompatibleWithCoverageAsAlpha
@ kUsesNonCoherentHWBlending
@ kRequiresNonOverlappingDraws
static sk_sp< const GrXferProcessor > MakeXferProcessor(const GrXPFactory *, const GrProcessorAnalysisColor &, GrProcessorAnalysisCoverage, const GrCaps &caps, GrClampType)
static AnalysisProperties GetAnalysisProperties(const GrXPFactory *, const GrProcessorAnalysisColor &, const GrProcessorAnalysisCoverage &, const GrCaps &, GrClampType)
bool isEqual(const GrXferProcessor &that) const
void append(const char text[])
void void void appendf(const char format[],...) SK_PRINTF_LIKE(2
DEF_SWITCHES_START aot vmservice shared library name
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode