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

Side by Side Diff: tests/IsClosedSingleContourTest.cpp

Issue 1522973002: Fix for GrAALinearizingConvexPathRenderer incorrectly drawing non-convex paths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/gpu/batches/GrAALinearizingConvexPathRenderer.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
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7 #include "Test.h"
8 #include "SkPathPriv.h"
9
10 DEF_TEST(IsClosedSingleContourTest, reporter) {
11 SkPath p;
12 REPORTER_ASSERT(reporter, !SkPathPriv::IsClosedSingleContour(p));
13
14 p.reset();
15 p.close();
16 REPORTER_ASSERT(reporter, !SkPathPriv::IsClosedSingleContour(p));
17
18 p.reset();
19 p.moveTo(10, 10);
20 p.close();
21 REPORTER_ASSERT(reporter, SkPathPriv::IsClosedSingleContour(p));
22
23 p.reset();
24 p.moveTo(10, 10);
25 p.lineTo(20, 20);
26 p.close();
27 REPORTER_ASSERT(reporter, SkPathPriv::IsClosedSingleContour(p));
28
29 p.reset();
30 p.moveTo(10, 10);
31 p.lineTo(20, 20);
32 p.quadTo(30, 30, 40, 40);
33 p.cubicTo(50, 50, 60, 60, 70, 70);
34 p.conicTo(30, 30, 40, 40, 0.5);
35 p.close();
36 REPORTER_ASSERT(reporter, SkPathPriv::IsClosedSingleContour(p));
37
38 p.reset();
39 p.moveTo(10, 10);
40 p.lineTo(20, 20);
41 p.lineTo(20, 30);
42 REPORTER_ASSERT(reporter, !SkPathPriv::IsClosedSingleContour(p));
43
44 p.reset();
45 p.moveTo(10, 10);
46 p.lineTo(20, 20);
47 p.moveTo(10, 10);
48 p.lineTo(20, 30);
49 p.close();
50 REPORTER_ASSERT(reporter, !SkPathPriv::IsClosedSingleContour(p));
51
52 p.reset();
53 p.moveTo(10, 10);
54 p.lineTo(20, 20);
55 p.close();
56 p.lineTo(20, 30);
57 p.close();
58 REPORTER_ASSERT(reporter, !SkPathPriv::IsClosedSingleContour(p));
59 }
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698