42class ShiftChannelsEffectAdapter final :
public AnimatablePropertyContainer {
46 const AnimationBuilder* abuilder) {
48 new ShiftChannelsEffectAdapter(jprops, std::move(layer), abuilder));
56 const AnimationBuilder* abuilder)
57 : fColorFilter(
sksg::ExternalColorFilter::
Make(
std::move(layer))) {
59 kTakeAlphaFrom_Index = 0,
60 kTakeRedFrom_Index = 1,
61 kTakeGreenFrom_Index = 2,
62 kTakeBlueFrom_Index = 3,
65 EffectBinder(jprops, *abuilder,
this)
66 .bind( kTakeRedFrom_Index, fR)
67 .bind(kTakeGreenFrom_Index, fG)
68 .bind( kTakeBlueFrom_Index, fB)
69 .bind(kTakeAlphaFrom_Index, fA);
72 enum class Source : uint8_t {
87 void onSync()
override {
90 static constexpr float gSourceCoeffs[][5] = {
102 static_assert(
std::size(gSourceCoeffs) ==
static_cast<size_t>(Source::kMax),
"");
107 src =
SkTPin(
src, 1.0f,
static_cast<float>(Source::kMax));
108 return gSourceCoeffs[
static_cast<size_t>(
src) - 1];
113 const float* bc =
coeffs(fB);
114 const float* ac =
coeffs(fA);
119 bc[0], bc[1], bc[2], bc[3], bc[4],
120 ac[0], ac[1], ac[2], ac[3], ac[4],
static const uint64_t kGreen
static const uint64_t kAlpha
static const uint64_t kBlue
static const uint64_t kRed
static constexpr const T & SkTPin(const T &x, const T &lo, const T &hi)
static sk_sp< SkColorFilter > Matrix(const SkColorMatrix &)
void attachDiscardableAdapter(sk_sp< T > adapter) const
constexpr SkColor4f kGreen
constexpr SkColor4f kBlue
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
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 keep the shell running after the Dart script has completed enable serial gc
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 keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
@ kSaturation
saturation of source with hue and luminosity of destination
@ kHue
hue of source with saturation and luminosity of destination