OLD | NEW |
| 1 /* |
| 2 * Copyright 2014 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
1 #include "Test.h" | 8 #include "Test.h" |
2 | 9 |
3 #include "SkRecord.h" | 10 #include "SkRecord.h" |
4 #include "SkRecorder.h" | 11 #include "SkRecorder.h" |
5 #include "SkRecords.h" | 12 #include "SkRecords.h" |
6 | 13 |
7 #define COUNT(T) + 1 | 14 #define COUNT(T) + 1 |
8 static const int kRecordTypes = SK_RECORD_TYPES(COUNT); | 15 static const int kRecordTypes = SK_RECORD_TYPES(COUNT); |
9 #undef COUNT | 16 #undef COUNT |
10 | 17 |
(...skipping 16 matching lines...) Expand all Loading... |
27 SkRecord record; | 34 SkRecord record; |
28 SkRecorder recorder(SkRecorder::kWriteOnly_Mode, &record, 1920, 1080); | 35 SkRecorder recorder(SkRecorder::kWriteOnly_Mode, &record, 1920, 1080); |
29 | 36 |
30 recorder.drawRect(SkRect::MakeWH(10, 10), SkPaint()); | 37 recorder.drawRect(SkRect::MakeWH(10, 10), SkPaint()); |
31 | 38 |
32 Tally tally; | 39 Tally tally; |
33 record.visit(tally); | 40 record.visit(tally); |
34 | 41 |
35 REPORTER_ASSERT(r, 1 == tally.count<SkRecords::DrawRect>()); | 42 REPORTER_ASSERT(r, 1 == tally.count<SkRecords::DrawRect>()); |
36 } | 43 } |
OLD | NEW |