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

Unified Diff: tests/PathOpsTestCommon.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/PathOpsTestCommon.h ('k') | tools/pathops_sorter.htm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsTestCommon.cpp
diff --git a/tests/PathOpsTestCommon.cpp b/tests/PathOpsTestCommon.cpp
index f1cba8ed8b2c8d07e79bbdfe5325b240d026f6ab..d93311513227ecb47277ef2a40c00e0efeb045e7 100644
--- a/tests/PathOpsTestCommon.cpp
+++ b/tests/PathOpsTestCommon.cpp
@@ -6,6 +6,7 @@
*/
#include "PathOpsTestCommon.h"
#include "SkPathOpsBounds.h"
+#include "SkPathOpsConic.h"
#include "SkPathOpsCubic.h"
#include "SkPathOpsLine.h"
#include "SkPathOpsQuad.h"
@@ -252,6 +253,18 @@ bool ValidBounds(const SkPathOpsBounds& bounds) {
return !SkScalarIsNaN(bounds.fBottom);
}
+bool ValidConic(const SkDConic& conic) {
+ for (int index = 0; index < SkDConic::kPointCount; ++index) {
+ if (!ValidPoint(conic[index])) {
+ return false;
+ }
+ }
+ if (SkDoubleIsNaN(conic.fWeight)) {
+ return false;
+ }
+ return true;
+}
+
bool ValidCubic(const SkDCubic& cubic) {
for (int index = 0; index < 4; ++index) {
if (!ValidPoint(cubic[index])) {
« no previous file with comments | « tests/PathOpsTestCommon.h ('k') | tools/pathops_sorter.htm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698