Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ad545d2 authored by Derek Sollenberger's avatar Derek Sollenberger
Browse files

Fix path direction enum to match native SkPath values

Change-Id: I4010e400cef0baf6dd23d7f7e837a2bfb7154059
parent e4a6f925
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -519,6 +519,9 @@ static JNINativeMethod methods[] = {

int register_android_graphics_Path(JNIEnv* env) {
    return RegisterMethodsOrDie(env, "android/graphics/Path", methods, NELEM(methods));

    static_assert(0  == SkPath::kCW_Direction,  "direction_mismatch");
    static_assert(1  == SkPath::kCCW_Direction, "direction_mismatch");
}

}
+2 −2
Original line number Diff line number Diff line
@@ -486,9 +486,9 @@ public class Path {
     */
    public enum Direction {
        /** clockwise */
        CW  (1),    // must match enum in SkPath.h
        CW  (0),    // must match enum in SkPath.h
        /** counter-clockwise */
        CCW (2);    // must match enum in SkPath.h
        CCW (1);    // must match enum in SkPath.h

        Direction(int ni) {
            nativeInt = ni;