OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "Test.h" | 8 #include "Test.h" |
9 | 9 |
10 #include "SkRecord.h" | 10 #include "SkRecord.h" |
11 #include "SkRecordCulling.h" | 11 #include "SkRecordOpts.h" |
12 #include "SkRecorder.h" | 12 #include "SkRecorder.h" |
13 #include "SkRecords.h" | 13 #include "SkRecords.h" |
14 | 14 |
15 struct PushCullScanner { | 15 struct PushCullScanner { |
16 template <typename T> void operator()(const T&) {} | 16 template <typename T> void operator()(const T&) {} |
17 | 17 |
18 SkTDArray<unsigned> fPopOffsets; | 18 SkTDArray<unsigned> fPopOffsets; |
19 }; | 19 }; |
20 | 20 |
21 template <> void PushCullScanner::operator()(const SkRecords::PushCull& record)
{ | 21 template <> void PushCullScanner::operator()(const SkRecords::PushCull& record)
{ |
(...skipping 17 matching lines...) Expand all Loading... |
39 | 39 |
40 SkRecordAnnotateCullingPairs(&record); | 40 SkRecordAnnotateCullingPairs(&record); |
41 | 41 |
42 PushCullScanner scan; | 42 PushCullScanner scan; |
43 record.visit(scan); | 43 record.visit(scan); |
44 | 44 |
45 REPORTER_ASSERT(r, 2 == scan.fPopOffsets.count()); | 45 REPORTER_ASSERT(r, 2 == scan.fPopOffsets.count()); |
46 REPORTER_ASSERT(r, 6 == scan.fPopOffsets[0]); | 46 REPORTER_ASSERT(r, 6 == scan.fPopOffsets[0]); |
47 REPORTER_ASSERT(r, 2 == scan.fPopOffsets[1]); | 47 REPORTER_ASSERT(r, 2 == scan.fPopOffsets[1]); |
48 } | 48 } |
OLD | NEW |