diff --git a/src/pathops/SkPathOpsCubic.h b/src/pathops/SkPathOpsCubic.h index f868fbe2c7..61de48d19c 100644 --- a/src/pathops/SkPathOpsCubic.h +++ b/src/pathops/SkPathOpsCubic.h @@ -11,11 +11,7 @@ #include "SkPath.h" #include "SkPathOpsPoint.h" -struct SkDCubicPair { - const SkDCubic& first() const { return (const SkDCubic&) pts[0]; } - const SkDCubic& second() const { return (const SkDCubic&) pts[3]; } - SkDPoint pts[7]; -}; +struct SkDCubicPair; struct SkDCubic { static const int kPointCount = 4; @@ -157,4 +153,26 @@ inline int other_two(int one, int two) { return 1 >> (3 - (one ^ two)) ^ 3; } +struct SkDCubicPair { + const SkDCubic first() const { +#ifdef SK_DEBUG + SkDCubic result; + result.debugSet(&pts[0]); + return result; +#else + return (const SkDCubic&) pts[0]; +#endif + } + const SkDCubic second() const { +#ifdef SK_DEBUG + SkDCubic result; + result.debugSet(&pts[3]); + return result; +#else + return (const SkDCubic&) pts[3]; +#endif + } + SkDPoint pts[7]; +}; + #endif