53 uint32_t nextU() { uint32_t r = fSeed * kMul + kAdd; fSeed = r;
return r; }
57 int32_t nextS() {
return (int32_t)this->nextU(); }
62 SkFixed nextSFixed1() {
return this->nextS() >> 15; }
75 normal.setLength(
scale);
82 : fSegLength(segLength), fPerterb(deviation), fSeedAssist(seedAssist)
98 LCGRandom rand(seed ^ ((seed << 16) | (seed >> 16)));
105 #if defined(SK_BUILD_FOR_FUZZER)
111 if (fSegLength * (2 + doFill) >
length) {
115 constexpr int kMaxReasonableIterations = 100000;
116 n =
std::min(n, kMaxReasonableIterations);
147 bounds->outset(maxOutset, maxOutset);
155 uint32_t seed =
buffer.readUInt();
160 buffer.writeScalar(fSegLength);
161 buffer.writeScalar(fPerterb);
162 buffer.writeUInt(fSeedAssist);
166 const char*
getTypeName()
const override {
return "SkDiscretePathEffect"; }
172 const uint32_t fSeedAssist;
180 uint32_t seedAssist) {
static void Perterb(SkPoint *p, const SkVector &tangent, SkScalar scale)
#define SkFixedToScalar(x)
static bool SkIsFinite(T x, Pack... values)
#define SkScalarRoundToInt(x)
#define SK_ScalarNearlyZero
void flatten(SkWriteBuffer &buffer) const override
static sk_sp< SkFlattenable > CreateProc(SkReadBuffer &buffer)
bool onFilterPath(SkPath *dst, const SkPath &src, SkStrokeRec *rec, const SkRect *, const SkMatrix &) const override
const char * getTypeName() const override
Factory getFactory() const override
SkDiscretePathEffectImpl(SkScalar segLength, SkScalar deviation, uint32_t seedAssist)
bool computeFastBounds(SkRect *bounds) const override
static sk_sp< SkPathEffect > Make(SkScalar segLength, SkScalar dev, uint32_t seedAssist=0)
static void RegisterFlattenables()
sk_sp< SkFlattenable >(* Factory)(SkReadBuffer &)
static void Register(const char name[], Factory)
bool getSegment(SkScalar startD, SkScalar stopD, SkPath *dst, bool startWithMoveTo)
bool getPosTan(SkScalar distance, SkPoint *position, SkVector *tangent)
static void RotateCCW(const SkPoint &src, SkPoint *dst)
static float min(float r, float g, float b)
Optional< SkRect > bounds
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