21#if defined(SK_SUPPORT_LEGACY_EMBOSSMASKFILTER)
28 if (!
SkIsFinite(blurSigma) || blurSigma <= 0) {
33 if (!lightDir.normalize()) {
36 Light newLight = light;
44#ifdef SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
47 if (direction ==
nullptr) {
67 : fLight(light), fBlurSigma(blurSigma)
94 if (
src.fImage ==
nullptr) {
101 uint8_t* alphaPlane =
dst->image();
102 size_t planeSize =
dst->computeImageSize();
103 if (0 == planeSize) {
107 memcpy(
dst->image(), alphaPlane, planeSize);
112 Light light = fLight;
126 memcpy(
dst->image(),
src.fImage,
src.computeImageSize());
133 if (
buffer.readByteArray(&light,
sizeof(Light))) {
136 return Make(sigma, light);
142 Light tmpLight = fLight;
144 buffer.writeByteArray(&tmpLight,
sizeof(tmpLight));
145 buffer.writeScalar(fBlurSigma);
@ kInner_SkBlurStyle
fuzzy inside, nothing outside
static U8CPU SkUnitScalarClampToByte(SkScalar x)
static bool SkIsFinite(T x, Pack... values)
#define SkScalarCeilToInt(x)
static constexpr const T & SkTPin(const T &x, const T &lo, const T &hi)
static bool BoxBlur(SkMaskBuilder *dst, const SkMask &src, SkScalar sigma, SkBlurStyle style, SkIPoint *margin=nullptr)
SkMask::Format getFormat() const override
static sk_sp< SkMaskFilter > Make(SkScalar blurSigma, const Light &light)
bool filterMask(SkMaskBuilder *dst, const SkMask &src, const SkMatrix &, SkIPoint *margin) const override
SkEmbossMaskFilter(SkScalar blurSigma, const Light &light)
void flatten(SkWriteBuffer &) const override
static void Emboss(SkMaskBuilder *mask, const SkEmbossMaskFilter::Light &)
unsigned useCenter Optional< SkMatrix > matrix
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
void set(int32_t x, int32_t y)
static void FreeImage(void *image)
static uint8_t * AllocImage(size_t bytes, AllocType=kUninit_Alloc)
@ k3D_Format
3 8bit per pixl planes: alpha, mul, add
@ kA8_Format
8bits per pixel mask (e.g. antialiasing)
bool setLength(float length)
static float Length(float x, float y)