8#ifndef SkClipStack_DEFINED
9#define SkClipStack_DEFINED
77 this->initRect(0,
rect,
m, op, doAA);
81 this->initRRect(0,
rrect,
m, op, doAA);
85 this->initPath(0,
path,
m, op, doAA);
89 this->initShader(0, std::move(shader));
93 this->initReplaceRect(0,
rect, doAA);
110 return *fDeviceSpacePath;
116 return fDeviceSpaceRRect;
122 (fDeviceSpaceRRect.
isRect() || fDeviceSpaceRRect.
isEmpty()));
131 return fShader.
get();
146 return fDeviceSpaceRRect;
151 bool isAA()
const {
return fDoAA; }
219 bool fIsIntersectionOfRects;
228 this->initRRect(saveCount,
rrect,
m, op, doAA);
232 this->initRect(saveCount,
rect,
m, op, doAA);
236 this->initPath(saveCount,
path,
m, op, doAA);
240 this->initShader(saveCount, std::move(shader));
244 this->initReplaceRect(saveCount,
rect, doAA);
247 void initCommon(
int saveCount,
SkClipOp op,
bool doAA);
253 void initReplaceRect(
int saveCount,
const SkRect&,
bool doAA);
258 inline void checkEmpty()
const;
259 inline bool canBeIntersectedInPlace(
int saveCount,
SkClipOp op)
const;
263 bool rectRectIntersectAllowed(
const SkRect& newR,
bool newAA)
const;
266 void updateBoundAndGenID(
const Element* prior);
270 kPrev_InvCur_FillCombo,
271 kInvPrev_Cur_FillCombo,
272 kInvPrev_InvCur_FillCombo
275 inline void combineBoundsDiff(FillCombo combination,
const SkRect& prevFinite);
276 inline void combineBoundsIntersection(
int combination,
const SkRect& prevFinite);
312 const int fSaveCount;
326 bool* isIntersectionOfRects =
nullptr)
const;
337 return this->
isWideOpen() || this->internalQuickContains(devRect);
341 return this->
isWideOpen() || this->internalQuickContains(devRRect);
465 using INHERITED =
Iter;
486 bool* isIntersectionOfRects =
nullptr)
const;
494 bool internalQuickContains(
const SkRect& devRect)
const;
495 bool internalQuickContains(
const SkRRect& devRRect)
const;
500 void pushElement(
const Element& element);
505 void restoreTo(
int saveCount);
510 static uint32_t GetNextGenID();
static void dump(const float m[20], SkYUVColorSpace cs, bool rgb2yuv)
AutoRestore(SkClipStack *cs, bool doSave)
B2TIter(const SkClipStack &stack)
void reset(const SkClipStack &stack)
bool operator!=(const Element &element) const
Call to get the type of the clip element.
sk_sp< SkShader > refShader() const
Element(sk_sp< SkShader > shader)
Element(const SkRect &rect, bool doAA)
Element(const SkRect &rect, const SkMatrix &m, SkClipOp op, bool doAA)
const SkShader * getShader() const
@ kPath
This element does not have geometry, but applies a shader to the clip.
@ kRect
This element combines a device space round-rect with the current clip.
@ kRRect
This element combines a device space path with the current clip.
uint32_t getGenID() const
const SkRect & getDeviceSpaceRect() const
Call if getDeviceSpaceType() is kShader to get a reference to the clip shader.
bool isAA() const
Inverts the fill of the clip shape. Note that a kEmpty element remains kEmpty.
void invertShapeFillType()
static const int kTypeCnt
int getSaveCount() const
Call if getDeviceSpaceType() is kPath to get the path.
const SkRRect & getDeviceSpaceRRect() const
Call if getDeviceSpaceType() is kRect to get the rect.
bool isInverseFilled() const
DeviceSpaceType getDeviceSpaceType() const
Call to get the save count associated with this clip element.
Element(const SkRRect &rrect, const SkMatrix &m, SkClipOp op, bool doAA)
const SkPath & getDeviceSpacePath() const
Call if getDeviceSpaceType() is kRRect to get the round-rect.
bool operator==(const Element &element) const
const SkRRect & asDeviceSpaceRRect() const
const SkRect & getBounds() const
bool contains(const SkRect &rect) const
Element(const SkPath &path, const SkMatrix &m, SkClipOp op, bool doAA)
bool isReplaceOp() const
Call to get the element as a path, regardless of its type.
void asDeviceSpacePath(SkPath *path) const
Call if getType() is not kPath to get the element as a round rect.
void reset(const SkClipStack &stack, IterStart startLoc)
const Element * skipToTopmost(SkClipOp op)
void clipRect(const SkRect &, const SkMatrix &matrix, SkClipOp, bool doAA)
void clipShader(sk_sp< SkShader >)
bool isRRect(const SkRect &bounds, SkRRect *rrect, bool *aa) const
bool quickContains(const SkRRect &devRRect) const
static const uint32_t kEmptyGenID
void clipRRect(const SkRRect &, const SkMatrix &matrix, SkClipOp, bool doAA)
bool quickContains(const SkRect &devRect) const
void getBounds(SkRect *canvFiniteBound, BoundsType *boundType, bool *isIntersectionOfRects=nullptr) const
bool isEmpty(const SkIRect &deviceBounds) const
void clipDevRect(const SkIRect &ir, SkClipOp op)
void getConservativeBounds(int offsetX, int offsetY, int maxWidth, int maxHeight, SkRect *devBounds, bool *isIntersectionOfRects=nullptr) const
bool operator==(const SkClipStack &b) const
SkClipStack & operator=(const SkClipStack &b)
uint32_t getTopmostGenID() const
static const uint32_t kInvalidGenID
static const uint32_t kWideOpenGenID
bool operator!=(const SkClipStack &b) const
void clipPath(const SkPath &, const SkMatrix &matrix, SkClipOp, bool doAA)
SkRect bounds(const SkIRect &deviceBounds) const
void replaceClip(const SkRect &devRect, bool doAA)
static const SkMatrix & I()
bool isInverseFillType() const
const SkRect & getBounds() const
unsigned useCenter Optional< SkMatrix > matrix
sk_sp< SkBlender > blender SkRect rect
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
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 keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
void set(const SkIRect &src)