38 matrix.postTranslate(-pts[0].fX, -pts[0].fY);
50 SkMatrix legacyLocalMatrix, *lmPtr =
nullptr;
51 if (!
desc.unflatten(
buffer, &legacyLocalMatrix)) {
55 lmPtr = &legacyLocalMatrix;
58 pts[0] =
buffer.readPoint();
59 pts[1] =
buffer.readPoint();
62 std::move(
desc.fColorSpace),
85 info->fPoint[0] = fStart;
86 info->fPoint[1] = fEnd;
108 if (1 == colorCount) {
111 if (localMatrix && !localMatrix->
invert(
nullptr)) {
126 colors, std::move(colorSpace),
pos, colorCount,
mode, interpolation);
129 return s->makeWithLocalMatrix(localMatrix ? *localMatrix :
SkMatrix::I());
static SkM44 inv(const SkM44 &m)
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
#define SK_REGISTER_FLATTENABLE(type)
static bool SkIsFinite(T x, Pack... values)
void SkRegisterLinearGradientShaderFlattenable()
static SkMatrix pts_to_unit_matrix(const SkPoint pts[2])
#define SkScalarInvert(x)
static bool SkScalarNearlyZero(SkScalar x, SkScalar tolerance=SK_ScalarNearlyZero)
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 > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
SkLinearGradient(const SkPoint pts[2], const Descriptor &)
void flatten(SkWriteBuffer &buffer) const override
void appendGradientStages(SkArenaAlloc *alloc, SkRasterPipeline *tPipeline, SkRasterPipeline *postPipeline) const final
GradientType asGradient(GradientInfo *info, SkMatrix *localMatrix) const override
bool invert(SkMatrix *inverse) const
static const SkMatrix & I()
FlutterSemanticsFlag flags
static constexpr skcms_TransferFunction kLinear
unsigned useCenter Optional< SkMatrix > matrix
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
void scale(float scale, SkPoint *dst) const