40 , fTScale(1 / (t1 - t0)) {
48 info->fPoint[0] = fCenter;
53 return GradientType::kSweep;
62 SkMatrix legacyLocalMatrix, *lmPtr =
nullptr;
63 if (!
desc.unflatten(
buffer, &legacyLocalMatrix)) {
67 lmPtr = &legacyLocalMatrix;
77 std::move(
desc.fColorSpace),
89 buffer.writePoint(fCenter);
90 buffer.writeScalar(fTBias);
91 buffer.writeScalar(fTScale);
96 p->append(SkRasterPipelineOp::xy_to_unit_angle);
113 if (1 == colorCount) {
119 if (localMatrix && !localMatrix->
invert(
nullptr)) {
130 static constexpr SkScalar clampPos[3] = {0, 1, 1};
132 return MakeSweep(cx, cy, reColors, std::move(colorSpace), clampPos, 3,
mode, 0,
133 endAngle, interpolation, localMatrix);
140 if (startAngle <= 0 && endAngle >= 360) {
146 colors, std::move(colorSpace),
pos, colorCount,
mode, interpolation);
152 return s->makeWithLocalMatrix(localMatrix ? *localMatrix :
SkMatrix::I());
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
#define SK_REGISTER_FLATTENABLE(type)
static bool SkIsFinite(T x, Pack... values)
static constexpr float sk_ieee_float_divide(float numer, float denom)
static bool SkScalarNearlyEqual(SkScalar x, SkScalar y, SkScalar tolerance=SK_ScalarNearlyZero)
static std::tuple< SkScalar, SkScalar > angles_from_t_coeff(SkScalar tBias, SkScalar tScale)
void SkRegisterSweepGradientShaderFlattenable()
static SkScalar center(float pos0, float pos1)
static constexpr SkScalar kDegenerateThreshold
static bool ValidGradient(const SkColor4f colors[], int count, SkTileMode tileMode, const Interpolation &interpolation)
static sk_sp< SkShader > MakeDegenerateGradient(const SkColor4f colors[], const SkScalar pos[], int colorCount, sk_sp< SkColorSpace > colorSpace, SkTileMode mode)
void flatten(SkWriteBuffer &) const override
void commonAsAGradient(GradientInfo *) const
static sk_sp< SkShader > MakeSweep(SkScalar cx, SkScalar cy, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, SkScalar startAngle, SkScalar endAngle, uint32_t flags, const SkMatrix *localMatrix)
static SkMatrix Scale(SkScalar sx, SkScalar sy)
static SkMatrix Translate(SkScalar dx, SkScalar dy)
bool invert(SkMatrix *inverse) const
static const SkMatrix & I()
void flatten(SkWriteBuffer &buffer) const override
GradientType asGradient(GradientInfo *info, SkMatrix *localMatrix) const override
SkSweepGradient(const SkPoint ¢er, SkScalar t0, SkScalar t1, const Descriptor &)
const SkPoint & center() const
void appendGradientStages(SkArenaAlloc *alloc, SkRasterPipeline *tPipeline, SkRasterPipeline *postPipeline) const override
FlutterSemanticsFlag flags
PODArray< SkColor > colors
SK_API sk_sp< SkShader > Color(SkColor)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
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
static constexpr SkPoint Make(float x, float y)
constexpr float y() const
constexpr float x() const