| 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 | 9 |
| 10 #include "SkDashPathEffect.h" | 10 #include "SkDashPathEffect.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 if (i < 2) { | 80 if (i < 2) { |
| 81 REPORTER_ASSERT(r, actualResult == testCases[j].fExpectedRes
ult); | 81 REPORTER_ASSERT(r, actualResult == testCases[j].fExpectedRes
ult); |
| 82 } else { | 82 } else { |
| 83 // On the third pass all the lines should be outside the tra
nslated cull rect | 83 // On the third pass all the lines should be outside the tra
nslated cull rect |
| 84 REPORTER_ASSERT(r, !actualResult); | 84 REPORTER_ASSERT(r, !actualResult); |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 |
| 91 DEF_TEST(DashPath_bug4871, r) { |
| 92 SkPath path; |
| 93 path.moveTo(30, 24); |
| 94 path.cubicTo(30.002f, 24, 30, 24, 30, 24); |
| 95 path.close(); |
| 96 |
| 97 SkScalar intervals[2] = { 1, 1 }; |
| 98 SkAutoTUnref<SkPathEffect> dash(SkDashPathEffect::Create(intervals, 2, 0)); |
| 99 |
| 100 SkPaint paint; |
| 101 paint.setStyle(SkPaint::kStroke_Style); |
| 102 paint.setPathEffect(dash); |
| 103 |
| 104 SkPath fill; |
| 105 paint.getFillPath(path, &fill); |
| 106 } |
| OLD | NEW |