Add conic support for Path#approximate
Fixes: 37722722
Test: bit CtsGraphicsTestCases:PathTest
Test: bit CtsUiRenderingTestCases:android.uirendering.cts.testclasses.PathTests
Also adds static asserts to path-walking code, to avoid this problem
in the future.
Also adds annotations, since this is public API now.
Change-Id: Ic39b167968b98fd8197be2d0f9aca79949717237
diff --git a/libs/hwui/PathTessellator.cpp b/libs/hwui/PathTessellator.cpp
index 9246237..64b2c45 100644
--- a/libs/hwui/PathTessellator.cpp
+++ b/libs/hwui/PathTessellator.cpp
@@ -1005,6 +1005,14 @@
break;
}
default:
+ static_assert(SkPath::kMove_Verb == 0
+ && SkPath::kLine_Verb == 1
+ && SkPath::kQuad_Verb == 2
+ && SkPath::kConic_Verb == 3
+ && SkPath::kCubic_Verb == 4
+ && SkPath::kClose_Verb == 5
+ && SkPath::kDone_Verb == 6,
+ "Path enum changed, new types may have been added");
break;
}
}