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 "SkPictureRecorder.h" | 10 #include "SkPictureRecorder.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 REPORTER_ASSERT(reporter, 1 == tally.count<SkRecords::DrawImage>()); | 92 REPORTER_ASSERT(reporter, 1 == tally.count<SkRecords::DrawImage>()); |
93 } | 93 } |
94 REPORTER_ASSERT(reporter, image->unique()); | 94 REPORTER_ASSERT(reporter, image->unique()); |
95 | 95 |
96 { | 96 { |
97 SkRecord record; | 97 SkRecord record; |
98 SkRecorder recorder(&record, 100, 100); | 98 SkRecorder recorder(&record, 100, 100); |
99 | 99 |
100 // DrawImageRect is supposed to take a reference | 100 // DrawImageRect is supposed to take a reference |
101 recorder.drawImageRect(image.get(), 0, SkRect::MakeWH(100, 100)); | 101 recorder.drawImageRect(image.get(), SkRect::MakeWH(100, 100), nullptr); |
102 REPORTER_ASSERT(reporter, !image->unique()); | 102 REPORTER_ASSERT(reporter, !image->unique()); |
103 | 103 |
104 Tally tally; | 104 Tally tally; |
105 tally.apply(record); | 105 tally.apply(record); |
106 | 106 |
107 REPORTER_ASSERT(reporter, 1 == tally.count<SkRecords::DrawImageRect>()); | 107 REPORTER_ASSERT(reporter, 1 == tally.count<SkRecords::DrawImageRect>()); |
108 } | 108 } |
109 REPORTER_ASSERT(reporter, image->unique()); | 109 REPORTER_ASSERT(reporter, image->unique()); |
110 } | 110 } |
OLD | NEW |