OLD | NEW |
1 #include "Test.h" | 1 #include "Test.h" |
2 | 2 |
3 #include "SkRecord.h" | 3 #include "SkRecord.h" |
4 #include "SkRecorder.h" | 4 #include "SkRecorder.h" |
5 #include "SkRecords.h" | 5 #include "SkRecords.h" |
6 | 6 |
7 #define COUNT(T) + 1 | 7 #define COUNT(T) + 1 |
8 static const int kRecordTypes = SK_RECORD_TYPES(COUNT); | 8 static const int kRecordTypes = SK_RECORD_TYPES(COUNT); |
9 #undef COUNT | 9 #undef COUNT |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 int* fHistogram; | 21 int* fHistogram; |
22 }; | 22 }; |
23 | 23 |
24 DEF_TEST(Recorder, r) { | 24 DEF_TEST(Recorder, r) { |
25 SkRecord record; | 25 SkRecord record; |
26 SkRecorder recorder(&record, 1920, 1080); | 26 SkRecorder recorder(&record, 1920, 1080); |
27 | 27 |
28 recorder.drawRect(SkRect::MakeWH(10, 10), SkPaint()); | 28 recorder.drawRect(SkRect::MakeWH(10, 10), SkPaint()); |
29 | 29 |
30 int histogram[kRecordTypes]; | 30 int histogram[kRecordTypes]; |
31 bzero(&histogram, sizeof(histogram)); | 31 sk_bzero(&histogram, sizeof(histogram)); |
32 | 32 |
33 record.visit(Tally(histogram)); | 33 record.visit(Tally(histogram)); |
34 | 34 |
35 REPORTER_ASSERT(r, 1 == histogram[SkRecords::DrawRect::kType]); | 35 REPORTER_ASSERT(r, 1 == histogram[SkRecords::DrawRect::kType]); |
36 } | 36 } |
OLD | NEW |