| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 /* Description: | 8 /* Description: |
| 9 * This test defines a series of elementatry test steps that perform | 9 * This test defines a series of elementatry test steps that perform |
| 10 * a single or a small group of canvas API calls. Each test step is | 10 * a single or a small group of canvas API calls. Each test step is |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 REPORTER_ASSERT_MESSAGE(reporter, canvas1->getSaveCount() == | 508 REPORTER_ASSERT_MESSAGE(reporter, canvas1->getSaveCount() == |
| 509 canvas2->getSaveCount(), testStep->assertMessage()); | 509 canvas2->getSaveCount(), testStep->assertMessage()); |
| 510 | 510 |
| 511 SkRect bounds1, bounds2; | 511 SkRect bounds1, bounds2; |
| 512 REPORTER_ASSERT_MESSAGE(reporter, | 512 REPORTER_ASSERT_MESSAGE(reporter, |
| 513 canvas1->getClipBounds(&bounds1) == canvas2->getClipBounds(&bounds2), | 513 canvas1->getClipBounds(&bounds1) == canvas2->getClipBounds(&bounds2), |
| 514 testStep->assertMessage()); | 514 testStep->assertMessage()); |
| 515 REPORTER_ASSERT_MESSAGE(reporter, bounds1 == bounds2, | 515 REPORTER_ASSERT_MESSAGE(reporter, bounds1 == bounds2, |
| 516 testStep->assertMessage()); | 516 testStep->assertMessage()); |
| 517 | 517 |
| 518 #ifdef SK_SUPPORT_LEGACY_DRAWFILTER |
| 518 REPORTER_ASSERT_MESSAGE(reporter, canvas1->getDrawFilter() == | 519 REPORTER_ASSERT_MESSAGE(reporter, canvas1->getDrawFilter() == |
| 519 canvas2->getDrawFilter(), testStep->assertMessage()); | 520 canvas2->getDrawFilter(), testStep->assertMessage()); |
| 521 #endif |
| 522 |
| 520 SkIRect deviceBounds1, deviceBounds2; | 523 SkIRect deviceBounds1, deviceBounds2; |
| 521 REPORTER_ASSERT_MESSAGE(reporter, | 524 REPORTER_ASSERT_MESSAGE(reporter, |
| 522 canvas1->getClipDeviceBounds(&deviceBounds1) == | 525 canvas1->getClipDeviceBounds(&deviceBounds1) == |
| 523 canvas2->getClipDeviceBounds(&deviceBounds2), | 526 canvas2->getClipDeviceBounds(&deviceBounds2), |
| 524 testStep->assertMessage()); | 527 testStep->assertMessage()); |
| 525 REPORTER_ASSERT_MESSAGE(reporter, deviceBounds1 == deviceBounds2, testStep->
assertMessage()); | 528 REPORTER_ASSERT_MESSAGE(reporter, deviceBounds1 == deviceBounds2, testStep->
assertMessage()); |
| 526 REPORTER_ASSERT_MESSAGE(reporter, canvas1->getTotalMatrix() == | 529 REPORTER_ASSERT_MESSAGE(reporter, canvas1->getTotalMatrix() == |
| 527 canvas2->getTotalMatrix(), testStep->assertMessage()); | 530 canvas2->getTotalMatrix(), testStep->assertMessage()); |
| 528 REPORTER_ASSERT_MESSAGE(reporter, equal_clips(*canvas1, *canvas2), testStep-
>assertMessage()); | 531 REPORTER_ASSERT_MESSAGE(reporter, equal_clips(*canvas1, *canvas2), testStep-
>assertMessage()); |
| 529 | 532 |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 REPORTER_ASSERT(reporter, canvas.getTotalMatrix() == filterCanvas.getTotalMa
trix()); | 753 REPORTER_ASSERT(reporter, canvas.getTotalMatrix() == filterCanvas.getTotalMa
trix()); |
| 751 REPORTER_ASSERT(reporter, canvas.getClipBounds(&clip1) == filterCanvas.getCl
ipBounds(&clip2)); | 754 REPORTER_ASSERT(reporter, canvas.getClipBounds(&clip1) == filterCanvas.getCl
ipBounds(&clip2)); |
| 752 REPORTER_ASSERT(reporter, clip1 == clip2); | 755 REPORTER_ASSERT(reporter, clip1 == clip2); |
| 753 | 756 |
| 754 filterCanvas.clipRect(SkRect::MakeXYWH(30.5f, 30.7f, 100, 100)); | 757 filterCanvas.clipRect(SkRect::MakeXYWH(30.5f, 30.7f, 100, 100)); |
| 755 filterCanvas.scale(0.75f, 0.5f); | 758 filterCanvas.scale(0.75f, 0.5f); |
| 756 REPORTER_ASSERT(reporter, canvas.getTotalMatrix() == filterCanvas.getTotalMa
trix()); | 759 REPORTER_ASSERT(reporter, canvas.getTotalMatrix() == filterCanvas.getTotalMa
trix()); |
| 757 REPORTER_ASSERT(reporter, canvas.getClipBounds(&clip1) == filterCanvas.getCl
ipBounds(&clip2)); | 760 REPORTER_ASSERT(reporter, canvas.getClipBounds(&clip1) == filterCanvas.getCl
ipBounds(&clip2)); |
| 758 REPORTER_ASSERT(reporter, clip1 == clip2); | 761 REPORTER_ASSERT(reporter, clip1 == clip2); |
| 759 } | 762 } |
| OLD | NEW |