8#ifndef SkRegion_DEFINED
9#define SkRegion_DEFINED
31 typedef int32_t RunType;
106 return !(*
this == other);
123 return !this->isEmpty();
146 bool isEmpty()
const {
return fRunHead == emptyRunHeadPtr(); }
152 bool isRect()
const {
return fRunHead == kRectRunHeadPtr; }
158 bool isComplex()
const {
return !this->isEmpty() && !this->isRect(); }
178 int computeRegionComplexity()
const;
271 bool intersects(
const SkRegion& other)
const;
314 fRunHead == kRectRunHeadPtr &&
328 return this->isEmpty() ||
rect.isEmpty() ||
340 return this->isEmpty() || rgn.
isEmpty() ||
385 if (this->isRect() && kIntersect_Op == op) {
387 return this->setEmpty();
391 return this->op(*
this,
rect, op);
435#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
488 bool done()
const {
return fDone; }
511 const SkRegion::RunType* fRuns;
590 const SkRegion::RunType* fRuns;
603 size_t writeToMemory(
void*
buffer)
const;
614 size_t readFromMemory(
const void*
buffer,
size_t length);
619 static constexpr int kOpCount = kReplace_Op + 1;
624 static constexpr int kRectRegionRuns = 7;
629 static constexpr RunHead* kRectRunHeadPtr =
nullptr;
632 void allocateRuns(
int count);
633 void allocateRuns(
int count,
int ySpanCount,
int intervalCount);
634 void allocateRuns(
const RunHead&
src);
651 const RunType* getRuns(RunType tmpStorage[],
int* intervals)
const;
656 bool setRuns(RunType runs[],
int count);
658 int count_runtype_values(
int* itop,
int* ibot)
const;
660 bool isValid()
const;
663 RunType runs[kRectRegionRuns]);
667 static bool RunsAreARect(
const SkRegion::RunType runs[],
int count,
681 friend class SkFlatRegion;
static bool rewind(EdgeList *activeEdges, Vertex **current, Vertex *dst, const Comparator &c)
std::unique_ptr< SkLatticeIter > fIter
static float next(float f)
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
static bool left(const SkPoint &p0, const SkPoint &p1)
static bool right(const SkPoint &p0, const SkPoint &p1)
void swap(sk_sp< T > &a, sk_sp< T > &b)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
static void dump(const float m[20], SkYUVColorSpace cs, bool rgb2yuv)
const SkIRect & rect() const
const SkIRect & rect() const
const SkRegion * rgn() const
void translate(int dx, int dy)
bool set(const SkRegion &src)
@ kReverseDifference_Op
operand minus target
@ kUnion_Op
target unioned with operand
@ kReplace_Op
replace target with operand
@ kIntersect_Op
target intersected with operand
@ kDifference_Op
target minus operand
@ kXOR_Op
target exclusive or with operand
bool quickContains(const SkIRect &r) const
const SkIRect & getBounds() const
bool op(const SkIRect &rect, Op op)
bool quickReject(const SkRegion &rgn) const
std::true_type sk_is_trivially_relocatable
bool quickReject(const SkIRect &rect) const
bool operator!=(const SkRegion &other) const
bool op(const SkRegion &rgn, Op op)
Optional< SkRect > bounds
ClipOpAndAA opAA SkRegion region
sk_sp< SkBlender > blender SkRect rect
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
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
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
bool operator==(C p1, const scoped_nsprotocol< C > &p2)
constexpr bool contains(std::string_view str, std::string_view needle)
static bool Intersects(const SkIRect &a, const SkIRect &b)
int32_t fBottom
larger y-axis bounds
int32_t fTop
smaller y-axis bounds
int32_t fLeft
smaller x-axis bounds
int32_t fRight
larger x-axis bounds
SkScalar fBottom
larger y-axis bounds
bool intersect(const SkRect &r)
SkScalar fLeft
smaller x-axis bounds
SkScalar fRight
larger x-axis bounds
SkScalar fTop
smaller y-axis bounds