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

Side by Side Diff: tests/ClipperTest.cpp

Issue 913503002: cull edges that are to the right of the clip (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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
« src/core/SkScan_Path.cpp ('K') | « src/core/SkScan_Path.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 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 "SkEdgeClipper.h" 9 #include "SkEdgeClipper.h"
10 #include "SkLineClipper.h" 10 #include "SkLineClipper.h"
(...skipping 30 matching lines...) Expand all
41 if (nonWhite) { 41 if (nonWhite) {
42 REPORTER_ASSERT(reporter, 0xFFFFFFFF != c); 42 REPORTER_ASSERT(reporter, 0xFFFFFFFF != c);
43 } else { 43 } else {
44 REPORTER_ASSERT(reporter, 0xFFFFFFFF == c); 44 REPORTER_ASSERT(reporter, 0xFFFFFFFF == c);
45 } 45 }
46 } 46 }
47 } 47 }
48 } 48 }
49 49
50 static void test_edgeclipper() { 50 static void test_edgeclipper() {
51 SkEdgeClipper clipper; 51 SkEdgeClipper clipper(false);
52 52
53 const SkPoint pts[] = { 53 const SkPoint pts[] = {
54 { 3.0995476e+010f, 42.929779f }, 54 { 3.0995476e+010f, 42.929779f },
55 { -3.0995163e+010f, 51.050385f }, 55 { -3.0995163e+010f, 51.050385f },
56 { -3.0995157e+010f, 51.050392f }, 56 { -3.0995157e+010f, 51.050392f },
57 { -3.0995134e+010f, 51.050400f }, 57 { -3.0995134e+010f, 51.050400f },
58 }; 58 };
59 59
60 const SkRect clip = { 0, 0, SkIntToScalar(300), SkIntToScalar(200) }; 60 const SkRect clip = { 0, 0, SkIntToScalar(300), SkIntToScalar(200) };
61 61
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 !memcmp(&gPartial[i+2], dst, sizeof(dst))); 141 !memcmp(&gPartial[i+2], dst, sizeof(dst)));
142 } 142 }
143 143
144 } 144 }
145 145
146 DEF_TEST(Clipper, reporter) { 146 DEF_TEST(Clipper, reporter) {
147 test_intersectline(reporter); 147 test_intersectline(reporter);
148 test_edgeclipper(); 148 test_edgeclipper();
149 test_hairclipping(reporter); 149 test_hairclipping(reporter);
150 } 150 }
OLDNEW
« src/core/SkScan_Path.cpp ('K') | « src/core/SkScan_Path.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698