Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: tests/DashPathEffectTest.cpp

Issue 1645613006: fix teeny dashed path bug (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkPathMeasure.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « src/core/SkPathMeasure.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698