26 fArea += (
int)(
draw.rect.width() *
draw.rect.height());
29 int area()
const {
return fArea; }
32 for (
int i = 0;
i < record.
count();
i++) {
45 draw->rect.fRight *= 2;
46 draw->rect.fBottom *= 2;
50 for (
int i = 0;
i < record->
count();
i++) {
56#define APPEND(record, type, ...) new (record.append<type>()) type{__VA_ARGS__}
74 stretch.
apply(&record);
83 APPEND(record, SkRecords::Save);
84 APPEND(record, SkRecords::ClipRect);
85 APPEND(record, SkRecords::NoOp);
86 APPEND(record, SkRecords::DrawRect);
87 APPEND(record, SkRecords::NoOp);
88 APPEND(record, SkRecords::NoOp);
89 APPEND(record, SkRecords::Restore);
94 assert_type<SkRecords::Save >(r, record, 0);
95 assert_type<SkRecords::ClipRect>(r, record, 1);
96 assert_type<SkRecords::DrawRect>(r, record, 2);
97 assert_type<SkRecords::Restore >(r, record, 3);
104 return (((uintptr_t)
p) & (
sizeof(
T) - 1)) == 0;
115 if (
sizeof(
void*) == 8) {
#define APPEND(record, type,...)
static bool is_aligned(const T *p)
#define REPORTER_ASSERT(r, cond,...)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void operator()(const T &)
void apply(const SkRecord &record)
void operator()(const SkRecords::DrawRect &draw)
auto visit(int i, F &&f) const -> decltype(f(SkRecords::NoOp()))
T * alloc(size_t count=1)
auto mutate(int i, F &&f) -> decltype(f((SkRecords::NoOp *) nullptr))
sk_sp< SkBlender > blender SkRect rect
static constexpr SkRect MakeWH(float w, float h)
void operator()(SkRecords::DrawRect *draw)
void apply(SkRecord *record)