152 {&gUserToClipDiff,
nullptr,
nullptr},
153 {&gUserToClipIsect,
nullptr,
nullptr},
154 {&gUserToClipUnion,
nullptr,
nullptr},
155 {&gUserToClipXorPass0, &gZeroUserBits,
nullptr},
156 {&gUserToClipRDiffPass0, &gZeroUserBits,
nullptr},
157 {&gUserToClipReplace,
nullptr,
nullptr}
160 {&gUserToClipIsect,
nullptr,
nullptr},
161 {&gUserToClipDiff,
nullptr,
nullptr},
162 {&gInvUserToClipUnionPass0, &gZeroUserBits,
nullptr},
163 {&gInvUserToClipXorPass0, &gZeroUserBits,
nullptr},
164 {&gInvUserToClipRDiffPass0, &gZeroUserBits,
nullptr},
165 {&gInvUserToClipReplace,
nullptr,
nullptr}
219 {&gDiffClip,
nullptr},
221 {&gUnionClip,
nullptr},
222 {&gXorClip,
nullptr},
224 {&gReplaceClip,
nullptr}
261 bool* drawDirectToClip) {
262 bool canRenderDirectToStencil =
269 if (canRenderDirectToStencil && !fillInverted) {
272 *drawDirectToClip =
true;
276 *drawDirectToClip =
false;
277 return gUserToClipTable[fillInverted][op];
327 args.fContext = rContext;
328 args.fSurfaceDrawContext = sdc;
330 args.fClipConservativeBounds = &
clip.scissorRect();
332 args.fShape = &shape;
333 args.fDoStencilMSAA = aa;
350 , fClip(sdc->dimensions()) {
362 if (!windowRects.
empty()) {
374 if (
rect.isEmpty()) {
378 bool drawDirectToClip;
380 false, &drawDirectToClip);
381 aa = supported_aa(fSDC, aa);
383 if (!drawDirectToClip) {
391 if (drawDirectToClip) {
392 draw_stencil_rect(fSDC, fClip, *pass,
matrix,
rect, aa);
394 draw_stencil_rect(fSDC, fClip, *pass,
SkMatrix::I(),
404 if (
path.isEmpty()) {
411 aa = supported_aa(fSDC, aa);
420 bool fillInverted =
path.isInverseFillType();
423 clipPath.writable()->toggleInverseFillType();
430 canDrawArgs.fCaps = fContext->
priv().
caps();
434 canDrawArgs.
fShape = &shape;
435 canDrawArgs.
fPaint =
nullptr;
437 canDrawArgs.
fAAType = pathAAType;
446 bool drawDirectToClip;
447 auto passes = get_stencil_passes(op, stencilSupport, fillInverted, &drawDirectToClip);
450 if (!drawDirectToClip) {
453 &gDrawToStencil,
matrix, shape, aa);
455 stencil_path(fContext, fSDC, pr, fClip.
fixedClip(),
matrix, shape, aa);
462 if (drawDirectToClip) {
464 *pass,
matrix, shape, aa);
466 draw_stencil_rect(fSDC, fClip, *pass,
SkMatrix::I(),
492 draw_stencil_rect(fSDC, fClip.
fixedClip(),
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
@ kSetClipAndReplaceUserBits
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
const GrCaps * caps() const
static const GrDisableColorXPFactory * Get()
PathRenderer * getPathRenderer(const PathRenderer::CanDrawPathArgs &, bool allowSW, PathRendererChain::DrawType, PathRenderer::StencilSupport *=nullptr)
const SkIRect & scissorRect() const
bool hasWindowRectangles() const
void setWindowRectangles(const GrWindowRectangles &windows, GrWindowRectsState::Mode mode)
bool setScissor(const SkIRect &irect)
GrDrawingManager * drawingManager()
GrRecordingContextPriv priv()
void asPath(SkPath *out, bool simpleFill=true) const
static const GrUserStencilSettings * SetClipBitSettings(bool setToInside)
static const GrStyle & SimpleFill()
bool inverseFilled() const
static const SkMatrix & I()
@ 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 drawPath(const DrawPathArgs &args)
@ kNoRestriction_StencilSupport
void stencilPath(const StencilPathArgs &args)
const GrFixedClip & fixedClip() const
uint32_t stencilStackID() const
void setStencilClip(uint32_t stencilStackID)
StencilMaskHelper(GrRecordingContext *, SurfaceDrawContext *)
void drawRect(const SkRect &rect, const SkMatrix &matrix, SkRegion::Op, GrAA)
void clear(bool insideStencil)
bool init(const SkIRect &maskBounds, uint32_t genID, const GrWindowRectangles &windowRects, int numFPs)
bool drawPath(const SkPath &path, const SkMatrix &matrix, SkRegion::Op, GrAA)
bool drawShape(const GrShape &shape, const SkMatrix &matrix, SkRegion::Op, GrAA)
GrRenderTargetProxy * asRenderTargetProxy()
bool canUseDynamicMSAA() const
void clearStencilClip(const SkIRect &scissor, bool insideStencilMask)
void setLastClip(uint32_t clipStackGenID, const SkIRect &devClipBounds, int numClipAnalyticElements)
bool mustRenderClip(uint32_t clipStackGenID, const SkIRect &devClipBounds, int numClipAnalyticElements)
void stencilRect(const GrClip *clip, const GrUserStencilSettings *ss, GrPaint &&paint, GrAA doStencilMSAA, const SkMatrix &viewMatrix, const SkRect &rect, const SkMatrix *localMatrix=nullptr)
const SkSurfaceProps & surfaceProps() const
static void draw_path(SkCanvas *canvas, const SkRect &r, sk_sp< SkImageFilter > imf)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
unsigned useCenter Optional< SkMatrix > matrix
Optional< SkRect > bounds
clipPath(r.path, r.opAA.op(), r.opAA.aa())) DRAW(ClipRRect
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
static constexpr Init< Ref, Test, TestMask, PassOp, FailOp, WriteMask > StaticInit()
static SkRect Make(const SkISize &size)
const GrStyledShape * fShape
const SkIRect * fClipConservativeBounds
bool fHasUserStencilSettings
const SkSurfaceProps * fSurfaceProps
const SkMatrix * fViewMatrix
const GrRenderTargetProxy * fProxy