struct Clip##clipop##PathOp final : TransformClipOpBase { \
static constexpr auto kType = DisplayListOpType::kClip##clipop##Path; \
\
Clip##clipop##PathOp(
const SkPath& path,
bool is_aa) \
: is_aa(is_aa), cached_path(path) {} \
\
const bool is_aa; \
const DlOpReceiver::CacheablePath cached_path; \
\
void dispatch(DispatchContext& ctx) const { \
if (op_needed(ctx)) { \
if (ctx.receiver.PrefersImpellerPaths()) { \
ctx.receiver.clipPath(cached_path, DlCanvas::ClipOp::k##clipop, \
is_aa); \
} else { \
ctx.receiver.clipPath(cached_path.sk_path, \
DlCanvas::ClipOp::k##clipop, is_aa); \
} \
} \
} \
\
return is_aa == other->is_aa && cached_path == other->cached_path \
? DisplayListCompare::kEqual \
: DisplayListCompare::kNotEqual; \
} \
};
static bool equals(T *a, T *b)
589 : TransformClipOpBase { \
590 static constexpr auto kType = DisplayListOpType::kClip##clipop##
Path; \
591 \
592 Clip##clipop##PathOp(
const SkPath& path,
bool is_aa) \
593 : is_aa(is_aa), cached_path(path) {} \
594 \
595 const bool is_aa; \
596 const DlOpReceiver::CacheablePath cached_path; \
597 \
598 void dispatch(DispatchContext& ctx) const { \
599 if (op_needed(ctx)) { \
600 if (ctx.receiver.PrefersImpellerPaths()) { \
601 ctx.receiver.clipPath(cached_path, DlCanvas::ClipOp::k##clipop, \
602 is_aa); \
603 } else { \
604 ctx.receiver.clipPath(cached_path.sk_path, \
605 DlCanvas::ClipOp::k##clipop, is_aa); \
606 } \
607 } \
608 } \
609 \
611 return is_aa == other->is_aa && cached_path == other->cached_path \
612 ? DisplayListCompare::kEqual \
613 : DisplayListCompare::kNotEqual; \
614 } \
615 };