Home | History | Annotate | Download | only in tests

Lines Matching refs:record

31     void apply(const SkRecord& record) {
32 for (int i = 0; i < record.count(); i++) {
33 record.visit(i, *this);
49 void apply(SkRecord* record) {
50 for (int i = 0; i < record->count(); i++) {
51 record->mutate(i, *this);
56 #define APPEND(record, type, ...) new (record.append<type>()) type{__VA_ARGS__}
59 DEF_TEST(Record, r) {
60 SkRecord record;
65 APPEND(record, SkRecords::DrawRect, paint, rect);
69 summer.apply(record);
74 stretch.apply(&record);
77 summer.apply(record);
82 SkRecord 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);
90 REPORTER_ASSERT(r, record.count() == 7);
92 record.defrag();
93 REPORTER_ASSERT(r, record.count() == 4);
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);
108 SkRecord record;
109 REPORTER_ASSERT(r, is_aligned(record.alloc<uint8_t>()));
110 REPORTER_ASSERT(r, is_aligned(record.alloc<uint16_t>()));
111 REPORTER_ASSERT(r, is_aligned(record.alloc<uint32_t>()));
112 REPORTER_ASSERT(r, is_aligned(record.alloc<void*>()));
116 REPORTER_ASSERT(r, is_aligned(record.alloc<double>()));
117 REPORTER_ASSERT(r, is_aligned(record.alloc<uint64_t>()));