| 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 3095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3106 REPORTER_ASSERT(reporter, !p.isConvex()); | 3106 REPORTER_ASSERT(reporter, !p.isConvex()); |
| 3107 p.reset(); | 3107 p.reset(); |
| 3108 SkRect emptyR = {10, 20, 10, 30}; | 3108 SkRect emptyR = {10, 20, 10, 30}; |
| 3109 rr.setRectRadii(emptyR, radii); | 3109 rr.setRectRadii(emptyR, radii); |
| 3110 p.addRRect(rr); | 3110 p.addRRect(rr); |
| 3111 REPORTER_ASSERT(reporter, p.isEmpty()); | 3111 REPORTER_ASSERT(reporter, p.isEmpty()); |
| 3112 SkRect largeR = {0, 0, SK_ScalarMax, SK_ScalarMax}; | 3112 SkRect largeR = {0, 0, SK_ScalarMax, SK_ScalarMax}; |
| 3113 rr.setRectRadii(largeR, radii); | 3113 rr.setRectRadii(largeR, radii); |
| 3114 p.addRRect(rr); | 3114 p.addRRect(rr); |
| 3115 test_rrect_convexity_is_unknown(reporter, &p, SkPath::kCW_Direction); | 3115 test_rrect_convexity_is_unknown(reporter, &p, SkPath::kCW_Direction); |
| 3116 |
| 3117 // we check for non-finites |
| 3116 SkRect infR = {0, 0, SK_ScalarMax, SK_ScalarInfinity}; | 3118 SkRect infR = {0, 0, SK_ScalarMax, SK_ScalarInfinity}; |
| 3117 rr.setRectRadii(infR, radii); | 3119 rr.setRectRadii(infR, radii); |
| 3118 p.addRRect(rr); | 3120 REPORTER_ASSERT(reporter, rr.isEmpty()); |
| 3119 test_rrect_convexity_is_unknown(reporter, &p, SkPath::kCW_Direction); | 3121 |
| 3120 SkRect tinyR = {0, 0, 1e-9f, 1e-9f}; | 3122 SkRect tinyR = {0, 0, 1e-9f, 1e-9f}; |
| 3121 p.addRoundRect(tinyR, 5e-11f, 5e-11f); | 3123 p.addRoundRect(tinyR, 5e-11f, 5e-11f); |
| 3122 test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction); | 3124 test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction); |
| 3123 } | 3125 } |
| 3124 | 3126 |
| 3125 static void test_arc(skiatest::Reporter* reporter) { | 3127 static void test_arc(skiatest::Reporter* reporter) { |
| 3126 SkPath p; | 3128 SkPath p; |
| 3127 SkRect emptyOval = {10, 20, 30, 20}; | 3129 SkRect emptyOval = {10, 20, 30, 20}; |
| 3128 REPORTER_ASSERT(reporter, emptyOval.isEmpty()); | 3130 REPORTER_ASSERT(reporter, emptyOval.isEmpty()); |
| 3129 p.addArc(emptyOval, 1, 2); | 3131 p.addArc(emptyOval, 1, 2); |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3763 test_addEmptyPath(reporter, SkPath::kAppend_AddPathMode); | 3765 test_addEmptyPath(reporter, SkPath::kAppend_AddPathMode); |
| 3764 test_conicTo_special_case(reporter); | 3766 test_conicTo_special_case(reporter); |
| 3765 test_get_point(reporter); | 3767 test_get_point(reporter); |
| 3766 test_contains(reporter); | 3768 test_contains(reporter); |
| 3767 PathTest_Private::TestPathTo(reporter); | 3769 PathTest_Private::TestPathTo(reporter); |
| 3768 PathRefTest_Private::TestPathRef(reporter); | 3770 PathRefTest_Private::TestPathRef(reporter); |
| 3769 test_dump(reporter); | 3771 test_dump(reporter); |
| 3770 test_path_crbugskia2820(reporter); | 3772 test_path_crbugskia2820(reporter); |
| 3771 test_skbug_3239(reporter); | 3773 test_skbug_3239(reporter); |
| 3772 } | 3774 } |
| OLD | NEW |