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

Side by Side Diff: tests/PathOpsBoundsTest.cpp

Issue 1037953004: add conics to path ops (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: turn off pathops specific debuggging Created 5 years, 8 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 | « tests/PathOpsAngleTest.cpp ('k') | tests/PathOpsConicIntersectionTest.cpp » ('j') | 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 2013 Google Inc. 2 * Copyright 2013 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 #include "PathOpsTestCommon.h" 7 #include "PathOpsTestCommon.h"
8 #include "SkPathOpsBounds.h" 8 #include "SkPathOpsBounds.h"
9 #include "Test.h" 9 #include "Test.h"
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 bool empty = bounds.isReallyEmpty(); 85 bool empty = bounds.isReallyEmpty();
86 REPORTER_ASSERT(reporter, empty); 86 REPORTER_ASSERT(reporter, empty);
87 } 87 }
88 for (size_t index = 0; index < notEmptyTestsCount; ++index) { 88 for (size_t index = 0; index < notEmptyTestsCount; ++index) {
89 const SkPathOpsBounds& bounds = static_cast<const SkPathOpsBounds&>(notR eallyEmpty[index]); 89 const SkPathOpsBounds& bounds = static_cast<const SkPathOpsBounds&>(notR eallyEmpty[index]);
90 SkASSERT(ValidBounds(bounds)); 90 SkASSERT(ValidBounds(bounds));
91 bool empty = bounds.isReallyEmpty(); 91 bool empty = bounds.isReallyEmpty();
92 REPORTER_ASSERT(reporter, !empty); 92 REPORTER_ASSERT(reporter, !empty);
93 } 93 }
94 const SkPoint curvePts[] = {{0, 0}, {1, 2}, {3, 4}, {5, 6}}; 94 const SkPoint curvePts[] = {{0, 0}, {1, 2}, {3, 4}, {5, 6}};
95 bounds.setLineBounds(curvePts); 95 bounds.setLineBounds(curvePts, 1);
96 expected.set(0, 0, 1, 2); 96 expected.set(0, 0, 1, 2);
97 REPORTER_ASSERT(reporter, bounds == expected); 97 REPORTER_ASSERT(reporter, bounds == expected);
98 (bounds.*SetCurveBounds[1])(curvePts); 98 (bounds.*SetCurveBounds[SkPath::kLine_Verb])(curvePts, 1);
99 REPORTER_ASSERT(reporter, bounds == expected); 99 REPORTER_ASSERT(reporter, bounds == expected);
100 bounds.setQuadBounds(curvePts); 100 bounds.setQuadBounds(curvePts, 1);
101 expected.set(0, 0, 3, 4); 101 expected.set(0, 0, 3, 4);
102 REPORTER_ASSERT(reporter, bounds == expected); 102 REPORTER_ASSERT(reporter, bounds == expected);
103 (bounds.*SetCurveBounds[2])(curvePts); 103 (bounds.*SetCurveBounds[SkPath::kQuad_Verb])(curvePts, 1);
104 REPORTER_ASSERT(reporter, bounds == expected); 104 REPORTER_ASSERT(reporter, bounds == expected);
105 bounds.setCubicBounds(curvePts); 105 bounds.setCubicBounds(curvePts, 1);
106 expected.set(0, 0, 5, 6); 106 expected.set(0, 0, 5, 6);
107 REPORTER_ASSERT(reporter, bounds == expected); 107 REPORTER_ASSERT(reporter, bounds == expected);
108 (bounds.*SetCurveBounds[3])(curvePts); 108 (bounds.*SetCurveBounds[SkPath::kCubic_Verb])(curvePts, 1);
109 REPORTER_ASSERT(reporter, bounds == expected); 109 REPORTER_ASSERT(reporter, bounds == expected);
110 } 110 }
OLDNEW
« no previous file with comments | « tests/PathOpsAngleTest.cpp ('k') | tests/PathOpsConicIntersectionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698