From 1049f1246e7be4ccb68001361efceb8933e6f81c Mon Sep 17 00:00:00 2001 From: caryclark Date: Mon, 20 Apr 2015 08:31:59 -0700 Subject: Now, path ops natively intersect conics, quads, and cubics in any combination. There are still a class of cubic tests that fail and a handful of undiagnosed failures from skps and fuzz tests, but things are much better overall. Extended tests (150M+) run to completion in release in about 6 minutes; the standard test suite exceeds 100K and finishes in a few seconds on desktops. TBR=reed BUG=skia:3588 Review URL: https://codereview.chromium.org/1037953004 --- tests/PathOpsTestCommon.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/PathOpsTestCommon.cpp') diff --git a/tests/PathOpsTestCommon.cpp b/tests/PathOpsTestCommon.cpp index f1cba8ed8b..d933115132 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])) { -- cgit v1.2.3