29 SkRect currentClip = bounds;
32 SkRect elementRect{0, 0, 0, 0};
33 switch (element->getDeviceSpaceType()) {
37 elementRect = element->getDeviceSpaceRect();
42 if (element->isReplaceOp()) {
58 if (element->isReplaceOp() ||
70 constexpr SkRect kHuge{-30000, -30000, 30000, 30000};
72 SkRect bounds = outerBounds;
75 element->asDeviceSpacePath(&operand);
77 switch (element->getOp()) {
90 if (!bounds.intersect(operand.
getBounds())) {
117 if (
is_rect(clipStack, outsetBounds, &clipStackRect)) {
143 if (clipStackGenID ==
currentEntry()->fClipStackGenID) {
148 if (clipStackGenID ==
currentEntry()->fClipStackGenID) {
187 if (
state.fShaderIndex >= 0) {
206 if (
state.fTextScaleX) {
void SkClipStack_AsPath(const SkClipStack &cs, SkPath *path)
static void apply_clip(const SkClipStack &stack, const SkRect &outerBounds, F fn)
static void emit_pdf_color(SkColor4f color, SkWStream *result)
static bool is_rect(const SkClipStack &clipStack, const SkRect &bounds, SkRect *dst)
static SkRect rect_intersect(SkRect u, SkRect v)
static bool is_complex_clip(const SkClipStack &stack)
static void append_clip_path(const SkPath &clipPath, SkWStream *wStream)
static void append_clip(const SkClipStack &clipStack, const SkIRect &bounds, SkWStream *wStream)
#define NOT_IMPLEMENTED(condition, assert)
@ kDifference_SkPathOp
subtract the op path from the first path
@ kIntersect_SkPathOp
intersect the two paths
@ kEmpty
This element makes the clip empty (regardless of previous elements).
@ kRect
This element combines a device space round-rect with the current clip.
uint32_t getTopmostGenID() const
static const uint32_t kWideOpenGenID
@ kIdentity_Mask
identity SkMatrix; all bits clear
@ kFill_Style
set to fill geometry
bool isInverseFillType() const
static SkPath Rect(const SkRect &, SkPathDirection=SkPathDirection::kCW, unsigned startIndex=0)
const SkRect & getBounds() const
bool writeText(const char text[])
void ApplyGraphicState(int objectIndex, SkWStream *content)
void EmitPath(const SkPath &path, SkPaint::Style paintStyle, bool doConsumeDegerates, SkWStream *content, SkScalar tolerance=0.25f)
void AppendRectangle(const SkRect &rect, SkWStream *content)
void AppendScalar(SkScalar value, SkWStream *stream)
void AppendTransform(const SkMatrix &, SkWStream *)
void ApplyPattern(int objectIndex, SkWStream *content)
void AppendColorComponentF(float value, SkWStream *wStream)
Entry fEntries[kMaxStackDepth+1]
void updateMatrix(const SkMatrix &matrix)
void updateDrawingState(const Entry &state)
SkDynamicMemoryWStream * fContentStream
static constexpr int kMaxStackDepth
void updateClip(const SkClipStack *clipStack, const SkIRect &bounds)
static SkRect Make(const SkISize &size)
bool intersect(const SkRect &r)