diff options
author | Chris Dalton <csmartdalton@google.com> | 2017-12-08 10:59:58 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-08 20:13:18 +0000 |
commit | be4ffab4e208ec47b4298621b9c9e8456f31717e (patch) | |
tree | 28bee87fec500acab63c2e72c77a6b7a4fd53ba1 /src/core/SkGeometry.h | |
parent | 3f39bf8fe596f87120d189dbec2889b644f07e2d (diff) |
CCPR: Combine loops and serpentines back into a single shader
Bug: skia:
Change-Id: I945471ccd2580a2d39afd9c80acb8d9e5e196435
Reviewed-on: https://skia-review.googlesource.com/82460
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/core/SkGeometry.h')
-rw-r--r-- | src/core/SkGeometry.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/core/SkGeometry.h b/src/core/SkGeometry.h index 176ba4ef1f..96b617fc76 100644 --- a/src/core/SkGeometry.h +++ b/src/core/SkGeometry.h @@ -174,13 +174,25 @@ static inline bool SkCubicIsDegenerate(SkCubicType type) { case SkCubicType::kLocalCusp: case SkCubicType::kCuspAtInfinity: return false; - default: - SK_ABORT("Invalid SkCubicType"); - // fallthru case SkCubicType::kQuadratic: case SkCubicType::kLineOrPoint: return true; } + SK_ABORT("Invalid SkCubicType"); + return true; +} + +static inline const char* SkCubicTypeName(SkCubicType type) { + switch (type) { + case SkCubicType::kSerpentine: return "kSerpentine"; + case SkCubicType::kLoop: return "kLoop"; + case SkCubicType::kLocalCusp: return "kLocalCusp"; + case SkCubicType::kCuspAtInfinity: return "kCuspAtInfinity"; + case SkCubicType::kQuadratic: return "kQuadratic"; + case SkCubicType::kLineOrPoint: return "kLineOrPoint"; + } + SK_ABORT("Invalid SkCubicType"); + return ""; } /** Returns the cubic classification. |