25 tileMode, 0, &localMatrix)
45 stops,
count, tileMode, 0, &localMatrix)
49 stops,
count, tileMode)
66 endPoints[0], startRadius, endPoints[1], endRadius,
colors,
67 stops,
count, tileMode, 0, &localMatrix)
72 endPoints[1], endRadius,
107 if (
result.effect ==
nullptr) {
108 printf(
"Failed to compile shader. Error text:\n%s",
112 return result.effect.release();
129 std::vector<sk_sp<SkShader>> childPointers;
130 for (
size_t i = 0;
i < childCount;
i++) {
131 childPointers.emplace_back(sk_ref_sp<SkShader>(children[
i]));
135 childPointers.data(), childCount,
nullptr)
const void * data() const
static sk_sp< SkData > MakeWithCopy(const void *data, size_t length)
static sk_sp< SkShader > MakeTwoPointConical(const SkPoint &start, SkScalar startRadius, const SkPoint &end, SkScalar endRadius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
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 sk_sp< SkShader > MakeRadial(const SkPoint ¢er, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
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)
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
size_t uniformSize() const
sk_sp< SkShader > makeShader(sk_sp< const SkData > uniforms, sk_sp< SkShader > children[], size_t childCount, const SkMatrix *localMatrix=nullptr) const
static Result MakeForShader(SkString sksl, const Options &)
sk_sp< const SkImage > image
PODArray< SkColor > colors
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
SkSamplingOptions samplingOptionsForQuality(FilterQuality quality)
SkMatrix createMatrix(const SkScalar *f)
SKWASM_EXPORT SkShader * shader_createSweepGradient(SkScalar centerX, SkScalar centerY, SkColor *colors, SkScalar *stops, int count, SkTileMode tileMode, SkScalar startAngle, SkScalar endAngle, SkScalar *matrix33)
SKWASM_EXPORT size_t runtimeEffect_getUniformSize(SkRuntimeEffect *effect)
SKWASM_EXPORT SkShader * shader_createFromImage(SkImage *image, SkTileMode tileModeX, SkTileMode tileModeY, FilterQuality quality, SkScalar *matrix33)
SKWASM_EXPORT void shader_dispose(SkShader *shader)
SKWASM_EXPORT SkRuntimeEffect * runtimeEffect_create(SkString *source)
SKWASM_EXPORT SkShader * shader_createRuntimeEffectShader(SkRuntimeEffect *runtimeEffect, SkData *uniforms, SkShader **children, size_t childCount)
SKWASM_EXPORT SkShader * shader_createConicalGradient(SkPoint *endPoints, SkScalar startRadius, SkScalar endRadius, SkColor *colors, SkScalar *stops, int count, SkTileMode tileMode, SkScalar *matrix33)
SKWASM_EXPORT SkShader * shader_createLinearGradient(SkPoint *endPoints, SkColor *colors, SkScalar *stops, int count, SkTileMode tileMode, SkScalar *matrix33)
SKWASM_EXPORT void runtimeEffect_dispose(SkRuntimeEffect *effect)
SKWASM_EXPORT SkShader * shader_createRadialGradient(SkScalar centerX, SkScalar centerY, SkScalar radius, SkColor *colors, SkScalar *stops, int count, SkTileMode tileMode, SkScalar *matrix33)