| 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 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 | 740 |
| 741 n = canvas.saveLayer(NULL, NULL); | 741 n = canvas.saveLayer(NULL, NULL); |
| 742 REPORTER_ASSERT(reporter, 2 == n); | 742 REPORTER_ASSERT(reporter, 2 == n); |
| 743 REPORTER_ASSERT(reporter, 3 == canvas.getSaveCount()); | 743 REPORTER_ASSERT(reporter, 3 == canvas.getSaveCount()); |
| 744 | 744 |
| 745 canvas.restore(); | 745 canvas.restore(); |
| 746 REPORTER_ASSERT(reporter, 2 == canvas.getSaveCount()); | 746 REPORTER_ASSERT(reporter, 2 == canvas.getSaveCount()); |
| 747 canvas.restore(); | 747 canvas.restore(); |
| 748 REPORTER_ASSERT(reporter, 1 == canvas.getSaveCount()); | 748 REPORTER_ASSERT(reporter, 1 == canvas.getSaveCount()); |
| 749 } | 749 } |
| 750 |
| 751 DEF_TEST(Canvas_ClipEmptyPath, reporter) { |
| 752 SkCanvas canvas(10, 10); |
| 753 canvas.save(); |
| 754 SkPath path; |
| 755 canvas.clipPath(path); |
| 756 canvas.restore(); |
| 757 canvas.save(); |
| 758 path.moveTo(5, 5); |
| 759 canvas.clipPath(path); |
| 760 canvas.restore(); |
| 761 canvas.save(); |
| 762 path.moveTo(7, 7); |
| 763 canvas.clipPath(path); // should not assert here |
| 764 canvas.restore(); |
| 765 } |
| OLD | NEW |