38class VenetianBlindsAdapter final :
public MaskShaderEffectBase {
43 const AnimationBuilder* abuilder) {
45 new VenetianBlindsAdapter(jprops, std::move(layer), layer_size, abuilder));
51 const AnimationBuilder* abuilder)
54 kCompletion_Index = 0,
60 EffectBinder(jprops, *abuilder,
this)
61 .bind(kCompletion_Index, fCompletion)
62 .bind( kDirection_Index, fDirection )
63 .bind( kWidth_Index, fWidth )
64 .bind( kFeather_Index, fFeather );
67 MaskInfo onMakeMask()
const override {
68 if (fCompletion >= 100) {
74 if (fCompletion <= 0) {
76 return {
nullptr,
true };
79 static constexpr float kFeatherSigmaFactor = 3.0f,
82 const auto t = fCompletion * 0.01f,
83 size = std::max(1.0f, fWidth),
85 feather = std::max(fFeather * kFeatherSigmaFactor, kMinFeather),
87 df0 = 0.5f * std::min(df, t),
88 df1 = 0.5f * std::min(df, 1 - t);
133 SkASSERT(0 <= g01 && g01 <= g23 && g23 <= 1);
137 colors[] = { c01, c23, c23, c01 };
146 static_assert(std::size(colors) == std::size(
pos),
"");
149 0.5f * this->layerSize().
height()),
151 -size * std::sin(angle));
154 center + grad_vec * (df0 + 0),
155 center + grad_vec * (df0 + 1),
constexpr SkColor SK_ColorTRANSPARENT
static constexpr SkColor SkColorSetA(SkColor c, U8CPU a)
constexpr SkColor SK_ColorWHITE
static constexpr float sk_ieee_float_divide(float numer, float denom)
static std::unique_ptr< SkEncoder > Make(SkWStream *dst, const SkPixmap *src, const SkYUVAPixmaps *srcYUVA, const SkColorSpace *srcYUVAColorSpace, const SkJpegEncoder::Options &options)
#define INHERITED(method,...)
#define SkDegreesToRadians(degrees)
#define SkScalarRoundToInt(x)
static SkScalar center(float pos0, float pos1)
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
void attachDiscardableAdapter(sk_sp< T > adapter) const
PODArray< SkColor > colors
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
static constexpr SkPoint Make(float x, float y)