30bool precompilebase_is_valid_as_child(
const PrecompileBase *child) {
35 switch (child->type()) {
69 std::optional<SkBlendMode>
asBlendMode() const final {
return fBlendMode; }
75 int desiredCombination)
const override {
86 return sk_make_sp<PrecompileBlendModeBlender>(blendMode);
91 GetKnownRuntimeEffect(SkKnownRuntimeEffects::StableKey::kArithmetic);
105 int desiredCombination)
const override {
115 return sk_make_sp<PrecompileEmptyShader>();
127 int desiredCombination)
const override {
141 return sk_make_sp<PrecompilePerlinNoiseShader>();
145 return sk_make_sp<PrecompilePerlinNoiseShader>();
162 int desiredCombination)
const override {
172 return sk_make_sp<PrecompileColorShader>();
178 return sk_make_sp<PrecompileColorShader>();
187 bool needsPorterDuffBased,
188 bool needsSeparableMode)
189 : fRuntimeBlendEffects(runtimeBlendEffects.
begin(), runtimeBlendEffects.
end())
190 , fDstOptions(dsts.
begin(), dsts.
end())
193 fNumBlenderCombos = 0;
194 for (
const auto& rt : fRuntimeBlendEffects) {
195 fNumBlenderCombos += rt->numCombinations();
197 if (needsPorterDuffBased) {
200 if (needsSeparableMode) {
207 for (
const auto&
d : fDstOptions) {
208 fNumDstCombos +=
d->numCombinations();
212 for (
const auto&
s : fSrcOptions) {
213 fNumSrcCombos +=
s->numCombinations();
216 if (needsPorterDuffBased) {
217 fPorterDuffIndex = 0;
218 if (needsSeparableMode) {
219 fSeparableModeIndex = 1;
220 if (!fRuntimeBlendEffects.empty()) {
223 }
else if (!fRuntimeBlendEffects.empty()) {
226 }
else if (needsSeparableMode) {
227 fSeparableModeIndex = 0;
228 if (!fRuntimeBlendEffects.empty()) {
232 SkASSERT(!fRuntimeBlendEffects.empty());
239 return fNumBlenderCombos * fNumDstCombos * fNumSrcCombos;
245 int desiredCombination)
const override {
248 const int desiredDstCombination = desiredCombination % fNumDstCombos;
249 int remainingCombinations = desiredCombination / fNumDstCombos;
251 const int desiredSrcCombination = remainingCombinations % fNumSrcCombos;
252 remainingCombinations /= fNumSrcCombos;
254 int desiredBlendCombination = remainingCombinations;
255 SkASSERT(desiredBlendCombination < fNumBlenderCombos);
257 if (desiredBlendCombination == fPorterDuffIndex ||
258 desiredBlendCombination == fSeparableModeIndex) {
263 GetKnownRuntimeEffect(SkKnownRuntimeEffects::StableKey::kBlend);
267 SkASSERT(desiredBlendCombination >= fBlenderIndex);
268 desiredBlendCombination -= fBlenderIndex;
271 AddToKey<PrecompileShader>(keyContext, builder, gatherer, fSrcOptions,
272 desiredSrcCombination);
273 AddToKey<PrecompileShader>(keyContext, builder, gatherer, fDstOptions,
274 desiredDstCombination);
276 if (desiredBlendCombination == fPorterDuffIndex) {
278 { 0.0f, 0.0f, 0.0f, 0.0f });
279 }
else if (desiredBlendCombination == fSeparableModeIndex) {
283 AddToKey<PrecompileBlender>(keyContext, builder, gatherer, fRuntimeBlendEffects,
284 desiredBlendCombination);
290 std::vector<sk_sp<PrecompileBlender>> fRuntimeBlendEffects;
291 std::vector<sk_sp<PrecompileShader>> fDstOptions;
292 std::vector<sk_sp<PrecompileShader>> fSrcOptions;
294 int fNumBlenderCombos;
298 int fPorterDuffIndex = -1;
299 int fSeparableModeIndex = -1;
300 int fBlenderIndex = -1;
307 std::vector<sk_sp<PrecompileBlender>> tmp;
308 tmp.reserve(blenders.size());
310 bool needsPorterDuffBased =
false;
311 bool needsBlendModeBased =
false;
313 for (
const auto&
b : blenders) {
315 needsPorterDuffBased =
true;
316 }
else if (
b->asBlendMode().has_value()) {
320 if (!coeffs.empty()) {
321 needsPorterDuffBased =
true;
323 needsBlendModeBased =
true;
330 if (!needsPorterDuffBased && !needsBlendModeBased && tmp.empty()) {
331 needsPorterDuffBased =
true;
336 needsPorterDuffBased, needsBlendModeBased);
344 bool needsPorterDuffBased =
false;
345 bool needsBlendModeBased =
false;
349 if (!porterDuffConstants.
empty()) {
350 needsPorterDuffBased =
true;
352 needsBlendModeBased =
true;
356 if (!needsPorterDuffBased && !needsBlendModeBased) {
357 needsPorterDuffBased =
true;
362 needsPorterDuffBased, needsBlendModeBased);
369 : fShaders(shaders.
begin(), shaders.
end()) {
370 fNumShaderCombos = 0;
371 for (
const auto&
s : fShaders) {
372 fNumShaderCombos +=
s->numCombinations();
378 return fNumShaderCombos;
384 int desiredCombination)
const override {
385 SkASSERT(desiredCombination < fNumShaderCombos);
387 constexpr SkRect kIgnored { 0, 0, 256, 256 };
393 AddToKey<PrecompileShader>(keyContext, builder, gatherer, fShaders, desiredCombination);
397 std::vector<sk_sp<PrecompileShader>> fShaders;
398 int fNumShaderCombos;
402 return sk_make_sp<PrecompileCoordClampShader>(input);
414 inline static constexpr int kNumSamplingTilingCombos = 3;
415 inline static constexpr int kCubicSampled = 2;
416 inline static constexpr int kHWTiled = 1;
417 inline static constexpr int kShaderTiled = 0;
420 inline static constexpr int kNumAlphaCombinations = 2;
421 inline static constexpr int kAlphaOnly = 1;
422 inline static constexpr int kNonAlphaOnly = 0;
425 int numSamplingTilingCombos =
430 return numSamplingTilingCombos;
432 return numSamplingTilingCombos * kNumAlphaCombinations;
438 int desiredCombination)
const override {
441 int desiredAlphaCombo, desiredSamplingTilingCombo;
444 desiredAlphaCombo = kNonAlphaOnly;
445 desiredSamplingTilingCombo = desiredCombination;
447 desiredAlphaCombo = desiredCombination % kNumAlphaCombinations;
448 desiredSamplingTilingCombo = desiredCombination / kNumAlphaCombinations;
452 SkASSERT(desiredSamplingTilingCombo < numSamplingTilingCombos);
466 desiredSamplingTilingCombo == kCubicSampled ? kDefaultCubicSampling
469 desiredSamplingTilingCombo == kHWTiled ? kHWTileableSize : kShaderTileableSize,
470 kSubset, kIgnoredSwizzle);
472 if (desiredAlphaCombo == kAlphaOnly) {
475 Blend(keyContext, builder, gatherer,
517 inline static constexpr int kNumIntrinsicCombinations = 2;
524 int desiredCombination)
const override {
525 SkASSERT(desiredCombination < kNumIntrinsicCombinations);
540 return sk_make_sp<PrecompileYUVImageShader>();
571 inline static constexpr int kNumStopVariants = 2;
572 inline static constexpr int kStopVariants[kNumStopVariants] = { 4, 8 };
575 return kNumStopVariants;
581 int desiredCombination)
const override {
584 SkASSERT(intrinsicCombination < kNumStopVariants);
593 Compose(keyContext, builder, gatherer,
607 sk_make_sp<PrecompileGradientShader>(SkShaderBase::GradientType::kLinear);
613 sk_make_sp<PrecompileGradientShader>(SkShaderBase::GradientType::kLinear);
622 sk_make_sp<PrecompileGradientShader>(SkShaderBase::GradientType::kRadial);
628 sk_make_sp<PrecompileGradientShader>(SkShaderBase::GradientType::kRadial);
637 sk_make_sp<PrecompileGradientShader>(SkShaderBase::GradientType::kSweep);
643 sk_make_sp<PrecompileGradientShader>(SkShaderBase::GradientType::kSweep);
652 sk_make_sp<PrecompileGradientShader>(SkShaderBase::GradientType::kConical);
658 sk_make_sp<PrecompileGradientShader>(SkShaderBase::GradientType::kConical);
680 fNumWrappedCombos = 0;
681 for (
const auto&
s : fWrapped) {
682 fNumWrappedCombos +=
s->numCombinations();
693 int desiredWrappedCombination = desiredCombination / kNumIntrinsicCombinations;
694 SkASSERT(desiredWrappedCombination < fNumWrappedCombos);
706 inline static constexpr int kNumIntrinsicCombinations = 2;
707 inline static constexpr int kWithLocalMatrix = 1;
708 inline static constexpr int kWithoutLocalMatrix = 0;
716 return kNumIntrinsicCombinations;
724 int desiredCombination)
const override {
727 int desiredLMCombination, desiredWrappedCombination;
730 desiredLMCombination = kWithLocalMatrix;
731 desiredWrappedCombination = desiredCombination;
733 desiredLMCombination = desiredCombination % kNumIntrinsicCombinations;
734 desiredWrappedCombination = desiredCombination / kNumIntrinsicCombinations;
736 SkASSERT(desiredWrappedCombination < fNumWrappedCombos);
738 if (desiredLMCombination == kWithLocalMatrix) {
744 AddToKey<PrecompileShader>(keyContext, builder, gatherer, fWrapped,
745 desiredWrappedCombination);
747 if (desiredLMCombination == kWithLocalMatrix) {
752 std::vector<sk_sp<PrecompileShader>> fWrapped;
753 int fNumWrappedCombos;
759 return sk_make_sp<PrecompileLocalMatrixShader>(std::move(
wrapped));
764 return sk_make_sp<PrecompileLocalMatrixShader>(
774 : fShaders(shaders.
begin(), shaders.
end())
775 , fColorFilters(colorFilters.
begin(), colorFilters.
end()) {
776 fNumShaderCombos = 0;
777 for (
const auto&
s : fShaders) {
778 fNumShaderCombos +=
s->numCombinations();
780 fNumColorFilterCombos = 0;
781 for (
const auto& cf : fColorFilters) {
782 fNumColorFilterCombos += cf->numCombinations();
792 int desiredCombination)
const override {
795 int desiredShaderCombination = desiredCombination % fNumShaderCombos;
796 int desiredColorFilterCombination = desiredCombination / fNumShaderCombos;
797 SkASSERT(desiredColorFilterCombination < fNumColorFilterCombos);
799 Compose(keyContext, builder, gatherer,
801 AddToKey<PrecompileShader>(keyContext, builder, gatherer, fShaders,
802 desiredShaderCombination);
805 AddToKey<PrecompileColorFilter>(keyContext, builder, gatherer, fColorFilters,
806 desiredColorFilterCombination);
810 std::vector<sk_sp<PrecompileShader>> fShaders;
811 std::vector<sk_sp<PrecompileColorFilter>> fColorFilters;
812 int fNumShaderCombos;
813 int fNumColorFilterCombos;
819 return sk_make_sp<PrecompileColorFilterShader>(std::move(shaders), std::move(colorFilters));
827 : fShaders(shaders.
begin(), shaders.
end())
828 , fColorSpaces(colorSpaces.
begin(), colorSpaces.
end()) {
829 fNumShaderCombos = 0;
830 for (
const auto&
s : fShaders) {
831 fNumShaderCombos +=
s->numCombinations();
841 int desiredCombination)
const override {
844 int desiredShaderCombination = desiredCombination % fNumShaderCombos;
845 int desiredColorSpaceCombination = desiredCombination / fNumShaderCombos;
846 SkASSERT(desiredColorSpaceCombination < (
int) fColorSpaces.size());
859 Compose(keyContext, builder, gatherer,
861 AddToKey<PrecompileShader>(keyContext, builder, gatherer, fShaders,
862 desiredShaderCombination);
866 workingCS.
get(), dstAT, dstCS.
get(), dstAT);
871 std::vector<sk_sp<PrecompileShader>> fShaders;
872 std::vector<sk_sp<SkColorSpace>> fColorSpaces;
873 int fNumShaderCombos;
879 return sk_make_sp<PrecompileWorkingColorSpaceShader>(std::move(shaders),
880 std::move(colorSpaces));
889 fNumWrappedCombos = 0;
890 for (
const auto&
s : fWrapped) {
891 fNumWrappedCombos +=
s->numCombinations();
896 SkASSERT(desiredCombination < fNumWrappedCombos);
912 int desiredCombination)
const override {
913 SkASSERT(desiredCombination < fNumWrappedCombos);
919 AddToKey<PrecompileShader>(keyContext, builder, gatherer, fWrapped, desiredCombination);
924 std::vector<sk_sp<PrecompileShader>> fWrapped;
925 int fNumWrappedCombos;
929 return sk_make_sp<PrecompileCTMShader>(std::move(
wrapped));
937 fNumWrappedCombos = fWrapped->numCombinations();
942 inline static constexpr int kNumIntrinsicCombinations = 12;
951 int desiredCombination)
const override {
956 int desiredBlurCombination = desiredCombination % kNumIntrinsicCombinations;
957 int desiredWrappedCombination = desiredCombination / kNumIntrinsicCombinations;
958 SkASSERT(desiredWrappedCombination < fNumWrappedCombos);
960 static const StableKey kIDs[kNumIntrinsicCombinations] = {
961 StableKey::k1DBlur4, StableKey::k1DBlur8, StableKey::k1DBlur12,
962 StableKey::k1DBlur16, StableKey::k1DBlur20, StableKey::k1DBlur28,
964 StableKey::k2DBlur4, StableKey::k2DBlur8, StableKey::k2DBlur12,
965 StableKey::k2DBlur16, StableKey::k2DBlur20, StableKey::k2DBlur28,
968 const SkRuntimeEffect* fEffect = GetKnownRuntimeEffect(kIDs[desiredBlurCombination]);
973 fWrapped->priv().addToKey(childContext, builder, gatherer, desiredWrappedCombination);
978 int fNumWrappedCombos;
982 return sk_make_sp<PrecompileBlurShader>(std::move(
wrapped));
994 int desiredCombination)
const override {
1003 return sk_make_sp<PrecompileBlurMaskFilter>();
1016 int desiredCombination)
const override {
1027 return sk_make_sp<PrecompileBlendModeColorFilter>();
1035 int desiredCombination)
const override {
1047 return sk_make_sp<PrecompileColorSpaceXformColorFilter>();
1051 return sk_make_sp<PrecompileColorSpaceXformColorFilter>();
1055 return sk_make_sp<PrecompileColorSpaceXformColorFilter>();
1061 GetKnownRuntimeEffect(SkKnownRuntimeEffects::StableKey::kLuma);
1071 : fOuterOptions(outerOptions.
begin(), outerOptions.
end())
1072 , fInnerOptions(innerOptions.
begin(), innerOptions.
end()) {
1074 fNumOuterCombos = 0;
1075 for (
const auto& outerOption : fOuterOptions) {
1076 fNumOuterCombos += outerOption ? outerOption->numCombinations() : 1;
1079 fNumInnerCombos = 0;
1080 for (
const auto& innerOption : fInnerOptions) {
1081 fNumInnerCombos += innerOption ? innerOption->numCombinations() : 1;
1091 int desiredCombination)
const override {
1094 const int desiredOuterCombination = desiredCombination % fNumOuterCombos;
1095 int remainingCombinations = desiredCombination / fNumOuterCombos;
1097 const int desiredInnerCombination = remainingCombinations % fNumInnerCombos;
1098 remainingCombinations /= fNumInnerCombos;
1103 int innerChildOptions, outerChildOptions;
1105 std::tie(outer, outerChildOptions) = SelectOption<PrecompileColorFilter>(
1106 fOuterOptions, desiredOuterCombination);
1107 std::tie(inner, innerChildOptions) = SelectOption<PrecompileColorFilter>(
1108 fInnerOptions, desiredInnerCombination);
1110 if (!inner && !outer) {
1113 }
else if (!inner) {
1114 outer->priv().addToKey(keyContext, builder, gatherer, outerChildOptions);
1115 }
else if (!outer) {
1116 inner->priv().addToKey(keyContext, builder, gatherer, innerChildOptions);
1118 Compose(keyContext, builder, gatherer,
1120 inner->priv().
addToKey(keyContext, builder, gatherer, innerChildOptions);
1123 outer->priv().addToKey(keyContext, builder, gatherer, outerChildOptions);
1128 std::vector<sk_sp<PrecompileColorFilter>> fOuterOptions;
1129 std::vector<sk_sp<PrecompileColorFilter>> fInnerOptions;
1131 int fNumOuterCombos;
1132 int fNumInnerCombos;
1142 return sk_make_sp<PrecompileComposeColorFilter>(outerOptions, innerOptions);
1150 int desiredCombination)
const override {
1158 return sk_make_sp<PrecompileGaussianColorFilter>();
1166 int desiredCombination)
const override {
1169 static constexpr float kIdentity[20] = { 1, 0, 0, 0, 0,
1181 return sk_make_sp<PrecompileMatrixColorFilter>();
1185 return sk_make_sp<PrecompileMatrixColorFilter>();
1193 if (dstOptions.empty() && srcOptions.empty()) {
1203 combos.
reserve(dstOptions.size() * srcOptions.size());
1211 for (
const std::array<const PrecompileChildPtr, 2>& combo : combos) {
1223 int desiredCombination)
const override {
1233 return sk_make_sp<PrecompileTableColorFilter>();
1238 return PrecompileColorFilters::Matrix();
1245 : fChildOptions(childOptions.
begin(), childOptions.
end()) {
1247 fNumChildCombos = 0;
1248 for (
const auto& childOption : fChildOptions) {
1249 fNumChildCombos += childOption->numCombinations();
1259 int desiredCombination)
const override {
1260 SkASSERT(desiredCombination < fNumChildCombos);
1268 Compose(keyContext, builder, gatherer,
1271 Compose(keyContext, builder, gatherer,
1279 AddToKey<PrecompileColorFilter>(keyContext, builder, gatherer,
1280 fChildOptions, desiredCombination);
1289 std::vector<sk_sp<PrecompileColorFilter>> fChildOptions;
1291 int fNumChildCombos;
1296 return sk_make_sp<PrecompileWithWorkingFormatColorFilter>(childOptions);
1303 : fChild(
std::move(cf)) {
1308 : fChild(
std::move(child)) {
1309 SkASSERT(precompilebase_is_valid_as_child(fChild.get()));
1314 switch (fChild->type()) {
1316 return SkRuntimeEffect::ChildType::kShader;
1318 return SkRuntimeEffect::ChildType::kColorFilter;
1320 return SkRuntimeEffect::ChildType::kBlender;
1325 return std::nullopt;
1349int num_options_in_set(
const std::vector<PrecompileChildPtr>& optionSet) {
1353 if (childOption.base()) {
1354 numOptions *= childOption.base()->numCombinations();
1362void add_children_to_key(
const KeyContext& keyContext,
1363 PaintParamsKeyBuilder* builder,
1364 PipelineDataGatherer* gatherer,
1365 int desiredCombination,
1366 const std::vector<PrecompileChildPtr>& optionSet,
1374 int remainingCombinations = desiredCombination;
1376 for (
size_t index = 0; index < optionSet.size(); ++index) {
1377 const PrecompileChildPtr& childOption = optionSet[index];
1379 const int numChildCombos = childOption.base() ? childOption.base()->numCombinations()
1381 const int curCombo = remainingCombinations % numChildCombos;
1382 remainingCombinations /= numChildCombos;
1384 std::optional<ChildType>
type = childOption.type();
1385 if (
type == ChildType::kShader) {
1386 childOption.shader()->priv().addToKey(childContext, builder, gatherer, curCombo);
1387 }
else if (
type == ChildType::kColorFilter) {
1388 childOption.colorFilter()->priv().addToKey(childContext, builder, gatherer, curCombo);
1389 }
else if (
type == ChildType::kBlender) {
1390 childOption.blender()->priv().addToKey(childContext, builder, gatherer, curCombo);
1395 switch (childInfo[index].
type) {
1396 case ChildType::kShader:
1402 case ChildType::kColorFilter:
1407 case ChildType::kBlender:
1423 : fEffect(
std::move(effect)) {
1424 fChildOptions.reserve(childOptions.
size());
1426 fChildOptions.push_back({ c.begin(), c.end() });
1433 for (
const std::vector<PrecompileChildPtr>& optionSet : fChildOptions) {
1434 numOptions += num_options_in_set(optionSet);
1437 return numOptions ? numOptions : 1;
1443 int desiredCombination)
const override {
1445 SkASSERT(desiredCombination < this->numCombinations());
1451 for (
const std::vector<PrecompileChildPtr>& optionSet : fChildOptions) {
1452 int numOptionsInSet = num_options_in_set(optionSet);
1454 if (desiredCombination < numOptionsInSet) {
1455 add_children_to_key(keyContext, builder, gatherer, desiredCombination, optionSet,
1460 desiredCombination -= numOptionsInSet;
1463 builder->endBlock();
1467 std::vector<std::vector<PrecompileChildPtr>> fChildOptions;
1476 return sk_make_sp<PrecompileRTEffect<PrecompileShader>>(std::move(effect), childOptions);
1485 return sk_make_sp<PrecompileRTEffect<PrecompileColorFilter>>(std::move(effect), childOptions);
1494 return sk_make_sp<PrecompileRTEffect<PrecompileBlender>>(std::move(effect), childOptions);
static const char * srcs[2]
static void is_empty(skiatest::Reporter *reporter, const SkPath &p)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kSrcOver
r = s + (1-sa)*d
@ kOverlay
multiply or screen, depending on destination
constexpr SkPMColor4f SK_PMColor4fWHITE
constexpr SkPMColor4f SK_PMColor4fTRANSPARENT
SkColorSpace * sk_srgb_singleton()
sk_sp< T > sk_ref_sp(T *obj)
static sk_sp< GrTextureProxy > wrapped(skiatest::Reporter *reporter, GrRecordingContext *rContext, GrProxyProvider *proxyProvider, SkBackingFit fit)
SkAlphaType alphaType() const
sk_sp< SkColorSpace > refColorSpace() const
SkColorType colorType() const
static sk_sp< SkColorSpace > MakeSRGB()
static const SkMatrix & I()
SkSpan< const Child > children() const
constexpr bool empty() const
constexpr size_t size() const
const SkColorInfo & dstColorInfo() const
int numCombinations() const
virtual int numChildCombinations() const
static std::pair< sk_sp< T >, int > SelectOption(SkSpan< const sk_sp< T > > options, int desiredOption)
std::optional< SkBlendMode > asBlendMode() const final
PrecompileBlendModeBlender(SkBlendMode blendMode)
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
PrecompileBlendModeColorFilter()
PrecompileBlendShader(SkSpan< const sk_sp< PrecompileBlender > > runtimeBlendEffects, SkSpan< const sk_sp< PrecompileShader > > dsts, SkSpan< const sk_sp< PrecompileShader > > srcs, bool needsPorterDuffBased, bool needsSeparableMode)
int numChildCombinations() const override
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
static sk_sp< PrecompileBlender > Mode(SkBlendMode)
PrecompileBlurMaskFilter()
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
int numChildCombinations() const override
int numIntrinsicCombinations() const override
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
PrecompileBlurShader(sk_sp< PrecompileShader > wrapped)
int numChildCombinations() const override
bool isConstant(int desiredCombination) const override
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
PrecompileCTMShader(SkSpan< const sk_sp< PrecompileShader > > wrapped)
PrecompileShader * shader() const
PrecompileBlender * blender() const
std::optional< SkRuntimeEffect::ChildType > type() const
PrecompileColorFilter * colorFilter() const
PrecompileChildPtr()=default
PrecompileColorFilterShader(SkSpan< const sk_sp< PrecompileShader > > shaders, SkSpan< const sk_sp< PrecompileColorFilter > > colorFilters)
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
int numChildCombinations() const override
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
bool isConstant(int desiredCombination) const override
PrecompileComposeColorFilter(SkSpan< const sk_sp< PrecompileColorFilter > > outerOptions, SkSpan< const sk_sp< PrecompileColorFilter > > innerOptions)
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
int numChildCombinations() const override
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
int numChildCombinations() const override
PrecompileCoordClampShader(SkSpan< const sk_sp< PrecompileShader > > shaders)
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
int numIntrinsicCombinations() const override
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
PrecompileGradientShader(SkShaderBase::GradientType type)
PrecompileImageShader(SkEnumBitMask< PrecompileImageShaderFlags > flags)
int numIntrinsicCombinations() const override
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
bool isALocalMatrixShader() const override
PrecompileLocalMatrixShader(SkSpan< const sk_sp< PrecompileShader > > wrapped, Flags flags=Flags::kNone)
int numChildCombinations() const override
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
int numIntrinsicCombinations() const override
bool isConstant(int desiredCombination) const override
static sk_sp< PrecompileMaskFilter > Blur()
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
PrecompilePerlinNoiseShader()
PrecompileRTEffect(sk_sp< SkRuntimeEffect > effect, SkSpan< const PrecompileChildOptions > childOptions)
int numChildCombinations() const override
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
int numChildCombinations() const override
PrecompileWorkingColorSpaceShader(SkSpan< const sk_sp< PrecompileShader > > shaders, SkSpan< const sk_sp< SkColorSpace > > colorSpaces)
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
int numIntrinsicCombinations() const override
void addToKey(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
PrecompileYUVImageShader()
static const char * begin(const StringSlice &s)
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
FlutterSemanticsFlag flags
const SkRuntimeEffect * GetKnownRuntimeEffect(StableKey stableKey)
SK_API sk_sp< PrecompileBlender > Arithmetic()
sk_sp< PrecompileColorFilter > WithWorkingFormat(SkSpan< const sk_sp< PrecompileColorFilter > > childOptions)
sk_sp< PrecompileColorFilter > Gaussian()
sk_sp< PrecompileColorFilter > ColorSpaceXform()
sk_sp< PrecompileShader > Image(SkEnumBitMask< PrecompileImageShaderFlags >)
sk_sp< PrecompileShader > CTM(SkSpan< const sk_sp< PrecompileShader > > wrapped)
sk_sp< PrecompileShader > LocalMatrixBothVariants(SkSpan< const sk_sp< PrecompileShader > > wrapped)
sk_sp< PrecompileShader > TwoPointConicalGradient(bool withLM)
sk_sp< PrecompileShader > Blur(sk_sp< PrecompileShader > child)
sk_sp< PrecompileShader > LinearGradient(bool withLM)
sk_sp< PrecompileShader > Picture(bool withLM)
sk_sp< PrecompileShader > SweepGradient(bool withLM)
sk_sp< PrecompileShader > RadialGradient(bool withLM)
SK_API sk_sp< PrecompileShader > ColorFilter(SkSpan< const sk_sp< PrecompileShader > > shaders, SkSpan< const sk_sp< PrecompileColorFilter > > colorFilters)
SK_API sk_sp< PrecompileShader > LocalMatrix(SkSpan< const sk_sp< PrecompileShader > > wrapped)
SK_API sk_sp< PrecompileShader > WorkingColorSpace(SkSpan< const sk_sp< PrecompileShader > > shaders, SkSpan< const sk_sp< SkColorSpace > > colorSpaces)
SK_API sk_sp< PrecompileShader > LinearGradient()
SK_API sk_sp< PrecompileShader > RadialGradient()
SK_API sk_sp< PrecompileShader > Picture()
SK_API sk_sp< PrecompileShader > CoordClamp(SkSpan< const sk_sp< PrecompileShader > >)
SK_API sk_sp< PrecompileShader > MakeTurbulence()
SK_API sk_sp< PrecompileShader > Image()
SK_API sk_sp< PrecompileShader > Empty()
SK_API sk_sp< PrecompileShader > Blend(SkSpan< SkBlendMode > blendModes, SkSpan< const sk_sp< PrecompileShader > > dsts, SkSpan< const sk_sp< PrecompileShader > > srcs)
SK_API sk_sp< PrecompileShader > MakeFractalNoise()
SK_API sk_sp< PrecompileShader > YUVImage()
SK_API sk_sp< PrecompileShader > SweepGradient()
SK_API sk_sp< PrecompileShader > RawImage()
SK_API sk_sp< PrecompileShader > Color()
SK_API sk_sp< PrecompileShader > TwoPointConicalGradient()
sk_sp< PrecompileBlender > MakePrecompileBlender(sk_sp< SkRuntimeEffect > effect, SkSpan< const PrecompileChildOptions > childOptions)
sk_sp< PrecompileShader > MakePrecompileShader(sk_sp< SkRuntimeEffect > effect, SkSpan< const PrecompileChildOptions > childOptions)
void AddKnownModeBlend(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, SkBlendMode bm)
void AddBlendModeColorFilter(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, SkBlendMode bm, const SkPMColor4f &srcColor)
void Compose(const KeyContext &keyContext, PaintParamsKeyBuilder *keyBuilder, PipelineDataGatherer *gatherer, AddToKeyFn addInnerToKey, AddToKeyFn addOuterToKey)
void Blend(const KeyContext &keyContext, PaintParamsKeyBuilder *keyBuilder, PipelineDataGatherer *gatherer, AddToKeyFn addBlendToKey, AddToKeyFn addSrcToKey, AddToKeyFn addDstToKey)
sk_sp< PrecompileColorFilter > MakePrecompileColorFilter(sk_sp< SkRuntimeEffect > effect, SkSpan< const PrecompileChildOptions > childOptions)
void AddModeBlend(const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, SkBlendMode bm)
SkSpan< const float > GetPorterDuffBlendConstants(SkBlendMode mode)
static constexpr SkCubicResampler Mitchell()
static constexpr SkISize MakeEmpty()
static constexpr SkISize Make(int32_t w, int32_t h)
static constexpr SkRect MakeEmpty()
static constexpr SkRect MakeWH(float w, float h)
static void AddBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, SkBlendMode)
static void BeginBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *)
static void AddBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, SkSpan< const float > coeffs)
static void BeginBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, const CoordClampData &)
static void AddBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, const GradientData &)
static void AddBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, const ImageData &)
static void BeginBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, const LMShaderData &)
static void AddBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, const MatrixColorFilterData &)
static void AddBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, const PerlinNoiseData &)
static void AddBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *)
static void BeginBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, const ShaderData &)
static void AddBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, const SkPMColor4f &)
static void AddBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, const TableColorFilterData &)
static void AddBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, const ImageData &)