OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkPaint.h" | 9 #include "SkPaint.h" |
10 #include "SkParse.h" | 10 #include "SkParse.h" |
(...skipping 3639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3650 p = self; | 3650 p = self; |
3651 | 3651 |
3652 // this triggers a code path in SkPath::swap which is otherwise unexercised | 3652 // this triggers a code path in SkPath::swap which is otherwise unexercised |
3653 p.swap(self); | 3653 p.swap(self); |
3654 | 3654 |
3655 bounds.set(0, 0, SK_Scalar1, SK_Scalar1); | 3655 bounds.set(0, 0, SK_Scalar1, SK_Scalar1); |
3656 | 3656 |
3657 p.addRoundRect(bounds, SK_Scalar1, SK_Scalar1); | 3657 p.addRoundRect(bounds, SK_Scalar1, SK_Scalar1); |
3658 check_convex_bounds(reporter, p, bounds); | 3658 check_convex_bounds(reporter, p, bounds); |
3659 // we have quads or cubics | 3659 // we have quads or cubics |
3660 REPORTER_ASSERT(reporter, p.getSegmentMasks() & kCurveSegmentMask); | 3660 REPORTER_ASSERT(reporter, |
| 3661 p.getSegmentMasks() & (kCurveSegmentMask | SkPath::kConic_Se
gmentMask)); |
3661 REPORTER_ASSERT(reporter, !p.isEmpty()); | 3662 REPORTER_ASSERT(reporter, !p.isEmpty()); |
3662 | 3663 |
3663 p.reset(); | 3664 p.reset(); |
3664 test_empty(reporter, p); | 3665 test_empty(reporter, p); |
3665 | 3666 |
3666 p.addOval(bounds); | 3667 p.addOval(bounds); |
3667 check_convex_bounds(reporter, p, bounds); | 3668 check_convex_bounds(reporter, p, bounds); |
3668 REPORTER_ASSERT(reporter, !p.isEmpty()); | 3669 REPORTER_ASSERT(reporter, !p.isEmpty()); |
3669 | 3670 |
3670 p.rewind(); | 3671 p.rewind(); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3759 test_addEmptyPath(reporter, SkPath::kAppend_AddPathMode); | 3760 test_addEmptyPath(reporter, SkPath::kAppend_AddPathMode); |
3760 test_conicTo_special_case(reporter); | 3761 test_conicTo_special_case(reporter); |
3761 test_get_point(reporter); | 3762 test_get_point(reporter); |
3762 test_contains(reporter); | 3763 test_contains(reporter); |
3763 PathTest_Private::TestPathTo(reporter); | 3764 PathTest_Private::TestPathTo(reporter); |
3764 PathRefTest_Private::TestPathRef(reporter); | 3765 PathRefTest_Private::TestPathRef(reporter); |
3765 test_dump(reporter); | 3766 test_dump(reporter); |
3766 test_path_crbugskia2820(reporter); | 3767 test_path_crbugskia2820(reporter); |
3767 test_skbug_3239(reporter); | 3768 test_skbug_3239(reporter); |
3768 } | 3769 } |
OLD | NEW |