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 #include "RecordTestUtils.h" | 9 #include "RecordTestUtils.h" |
10 | 10 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 recorder.scale(2, 2); | 130 recorder.scale(2, 2); |
131 recorder.drawRect(SkRect::MakeWH(320, 240), SkPaint()); | 131 recorder.drawRect(SkRect::MakeWH(320, 240), SkPaint()); |
132 recorder.restore(); | 132 recorder.restore(); |
133 | 133 |
134 SkRecordFillBounds(record, &bbh); | 134 SkRecordFillBounds(record, &bbh); |
135 | 135 |
136 REPORTER_ASSERT(r, bbh.entries.count() == 5); | 136 REPORTER_ASSERT(r, bbh.entries.count() == 5); |
137 for (int i = 0; i < bbh.entries.count(); i++) { | 137 for (int i = 0; i < bbh.entries.count(); i++) { |
138 REPORTER_ASSERT(r, bbh.entries[i].data == (uintptr_t)i); | 138 REPORTER_ASSERT(r, bbh.entries[i].data == (uintptr_t)i); |
139 | 139 |
| 140 if (bbh.entries[i].bounds != SkRect::MakeWH(400, 480)) { |
| 141 SkRect bounds = bbh.entries[i].bounds; |
| 142 SkDebugf("Expected 0,0,400,480, got %f %f %f %f\n", |
| 143 bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom); |
| 144 } |
140 REPORTER_ASSERT(r, bbh.entries[i].bounds == SkRect::MakeWH(400, 480)); | 145 REPORTER_ASSERT(r, bbh.entries[i].bounds == SkRect::MakeWH(400, 480)); |
141 } | 146 } |
142 } | 147 } |
OLD | NEW |