Loading core/jni/android/graphics/Path.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -132,14 +132,14 @@ public: static void addRect(JNIEnv* env, jclass clazz, jlong objHandle, jfloat left, jfloat top, jfloat right, jfloat bottom, jint dirHandle) { SkPath* obj = reinterpret_cast<SkPath*>(objHandle); SkPath::Direction dir = static_cast<SkPath::Direction>(dirHandle); SkPathDirection dir = static_cast<SkPathDirection>(dirHandle); obj->addRect(left, top, right, bottom, dir); } static void addOval(JNIEnv* env, jclass clazz, jlong objHandle, jfloat left, jfloat top, jfloat right, jfloat bottom, jint dirHandle) { SkPath* obj = reinterpret_cast<SkPath*>(objHandle); SkPath::Direction dir = static_cast<SkPath::Direction>(dirHandle); SkPathDirection dir = static_cast<SkPathDirection>(dirHandle); SkRect oval = SkRect::MakeLTRB(left, top, right, bottom); obj->addOval(oval, dir); } Loading @@ -147,7 +147,7 @@ public: static void addCircle(JNIEnv* env, jclass clazz, jlong objHandle, jfloat x, jfloat y, jfloat radius, jint dirHandle) { SkPath* obj = reinterpret_cast<SkPath*>(objHandle); SkPath::Direction dir = static_cast<SkPath::Direction>(dirHandle); SkPathDirection dir = static_cast<SkPathDirection>(dirHandle); obj->addCircle(x, y, radius, dir); } Loading @@ -162,7 +162,7 @@ public: jfloat right, jfloat bottom, jfloat rx, jfloat ry, jint dirHandle) { SkRect rect = SkRect::MakeLTRB(left, top, right, bottom); SkPath* obj = reinterpret_cast<SkPath*>(objHandle); SkPath::Direction dir = static_cast<SkPath::Direction>(dirHandle); SkPathDirection dir = static_cast<SkPathDirection>(dirHandle); obj->addRoundRect(rect, rx, ry, dir); } Loading @@ -170,7 +170,7 @@ public: jfloat right, jfloat bottom, jfloatArray array, jint dirHandle) { SkRect rect = SkRect::MakeLTRB(left, top, right, bottom); SkPath* obj = reinterpret_cast<SkPath*>(objHandle); SkPath::Direction dir = static_cast<SkPath::Direction>(dirHandle); SkPathDirection dir = static_cast<SkPathDirection>(dirHandle); AutoJavaFloatArray afa(env, array, 8); #ifdef SK_SCALAR_IS_FLOAT const float* src = afa.ptr(); Loading Loading @@ -555,8 +555,8 @@ static const 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"); static_assert(0 == (int)SkPathDirection::kCW, "direction_mismatch"); static_assert(1 == (int)SkPathDirection::kCCW, "direction_mismatch"); } } libs/hwui/tests/unit/VectorDrawableTests.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -85,9 +85,9 @@ const static TestData sTestDataSet[] = { outPath->rCubicTo(8.0, 8.0, 8.0, 8.0, 8.0, 8.0); outPath->cubicTo(16.0, 16.0, 9.0, 9.0, 9.0, 9.0); outPath->rCubicTo(0.0, 0.0, 9.0, 9.0, 9.0, 9.0); outPath->arcTo(10.0, 10.0, 0.0, SkPath::kLarge_ArcSize, SkPath::kCW_Direction, 10.0, outPath->arcTo(10.0, 10.0, 0.0, SkPath::kLarge_ArcSize, SkPathDirection::kCW, 10.0, 10.0); outPath->arcTo(10.0, 10.0, 0.0, SkPath::kLarge_ArcSize, SkPath::kCW_Direction, 20.0, outPath->arcTo(10.0, 10.0, 0.0, SkPath::kLarge_ArcSize, SkPathDirection::kCW, 20.0, 20.0); }}, Loading Loading @@ -159,7 +159,7 @@ const static TestData sTestDataSet[] = { }, [](SkPath* outPath) { outPath->moveTo(300.0, 70.0); outPath->arcTo(230.0, 230.0, 0.0, SkPath::kLarge_ArcSize, SkPath::kCCW_Direction, outPath->arcTo(230.0, 230.0, 0.0, SkPath::kLarge_ArcSize, SkPathDirection::kCCW, 301.0, 70.0); outPath->close(); outPath->moveTo(300.0, 70.0); Loading libs/hwui/utils/VectorDrawableUtils.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -300,7 +300,7 @@ void PathResolver::addCommand(SkPath* outPath, char previousCmd, char cmd, // (rx ry x-axis-rotation large-arc-flag sweep-flag x y) outPath->arcTo(points->at(k + 0), points->at(k + 1), points->at(k + 2), (SkPath::ArcSize) (points->at(k + 3) != 0), (SkPath::Direction) (points->at(k + 4) == 0), (SkPathDirection) (points->at(k + 4) == 0), points->at(k + 5) + currentX, points->at(k + 6) + currentY); currentX += points->at(k + 5); currentY += points->at(k + 6); Loading @@ -310,7 +310,7 @@ void PathResolver::addCommand(SkPath* outPath, char previousCmd, char cmd, case 'A': // Draws an elliptical arc outPath->arcTo(points->at(k + 0), points->at(k + 1), points->at(k + 2), (SkPath::ArcSize) (points->at(k + 3) != 0), (SkPath::Direction) (points->at(k + 4) == 0), (SkPathDirection) (points->at(k + 4) == 0), points->at(k + 5), points->at(k + 6)); currentX = points->at(k + 5); currentY = points->at(k + 6); Loading Loading
core/jni/android/graphics/Path.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -132,14 +132,14 @@ public: static void addRect(JNIEnv* env, jclass clazz, jlong objHandle, jfloat left, jfloat top, jfloat right, jfloat bottom, jint dirHandle) { SkPath* obj = reinterpret_cast<SkPath*>(objHandle); SkPath::Direction dir = static_cast<SkPath::Direction>(dirHandle); SkPathDirection dir = static_cast<SkPathDirection>(dirHandle); obj->addRect(left, top, right, bottom, dir); } static void addOval(JNIEnv* env, jclass clazz, jlong objHandle, jfloat left, jfloat top, jfloat right, jfloat bottom, jint dirHandle) { SkPath* obj = reinterpret_cast<SkPath*>(objHandle); SkPath::Direction dir = static_cast<SkPath::Direction>(dirHandle); SkPathDirection dir = static_cast<SkPathDirection>(dirHandle); SkRect oval = SkRect::MakeLTRB(left, top, right, bottom); obj->addOval(oval, dir); } Loading @@ -147,7 +147,7 @@ public: static void addCircle(JNIEnv* env, jclass clazz, jlong objHandle, jfloat x, jfloat y, jfloat radius, jint dirHandle) { SkPath* obj = reinterpret_cast<SkPath*>(objHandle); SkPath::Direction dir = static_cast<SkPath::Direction>(dirHandle); SkPathDirection dir = static_cast<SkPathDirection>(dirHandle); obj->addCircle(x, y, radius, dir); } Loading @@ -162,7 +162,7 @@ public: jfloat right, jfloat bottom, jfloat rx, jfloat ry, jint dirHandle) { SkRect rect = SkRect::MakeLTRB(left, top, right, bottom); SkPath* obj = reinterpret_cast<SkPath*>(objHandle); SkPath::Direction dir = static_cast<SkPath::Direction>(dirHandle); SkPathDirection dir = static_cast<SkPathDirection>(dirHandle); obj->addRoundRect(rect, rx, ry, dir); } Loading @@ -170,7 +170,7 @@ public: jfloat right, jfloat bottom, jfloatArray array, jint dirHandle) { SkRect rect = SkRect::MakeLTRB(left, top, right, bottom); SkPath* obj = reinterpret_cast<SkPath*>(objHandle); SkPath::Direction dir = static_cast<SkPath::Direction>(dirHandle); SkPathDirection dir = static_cast<SkPathDirection>(dirHandle); AutoJavaFloatArray afa(env, array, 8); #ifdef SK_SCALAR_IS_FLOAT const float* src = afa.ptr(); Loading Loading @@ -555,8 +555,8 @@ static const 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"); static_assert(0 == (int)SkPathDirection::kCW, "direction_mismatch"); static_assert(1 == (int)SkPathDirection::kCCW, "direction_mismatch"); } }
libs/hwui/tests/unit/VectorDrawableTests.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -85,9 +85,9 @@ const static TestData sTestDataSet[] = { outPath->rCubicTo(8.0, 8.0, 8.0, 8.0, 8.0, 8.0); outPath->cubicTo(16.0, 16.0, 9.0, 9.0, 9.0, 9.0); outPath->rCubicTo(0.0, 0.0, 9.0, 9.0, 9.0, 9.0); outPath->arcTo(10.0, 10.0, 0.0, SkPath::kLarge_ArcSize, SkPath::kCW_Direction, 10.0, outPath->arcTo(10.0, 10.0, 0.0, SkPath::kLarge_ArcSize, SkPathDirection::kCW, 10.0, 10.0); outPath->arcTo(10.0, 10.0, 0.0, SkPath::kLarge_ArcSize, SkPath::kCW_Direction, 20.0, outPath->arcTo(10.0, 10.0, 0.0, SkPath::kLarge_ArcSize, SkPathDirection::kCW, 20.0, 20.0); }}, Loading Loading @@ -159,7 +159,7 @@ const static TestData sTestDataSet[] = { }, [](SkPath* outPath) { outPath->moveTo(300.0, 70.0); outPath->arcTo(230.0, 230.0, 0.0, SkPath::kLarge_ArcSize, SkPath::kCCW_Direction, outPath->arcTo(230.0, 230.0, 0.0, SkPath::kLarge_ArcSize, SkPathDirection::kCCW, 301.0, 70.0); outPath->close(); outPath->moveTo(300.0, 70.0); Loading
libs/hwui/utils/VectorDrawableUtils.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -300,7 +300,7 @@ void PathResolver::addCommand(SkPath* outPath, char previousCmd, char cmd, // (rx ry x-axis-rotation large-arc-flag sweep-flag x y) outPath->arcTo(points->at(k + 0), points->at(k + 1), points->at(k + 2), (SkPath::ArcSize) (points->at(k + 3) != 0), (SkPath::Direction) (points->at(k + 4) == 0), (SkPathDirection) (points->at(k + 4) == 0), points->at(k + 5) + currentX, points->at(k + 6) + currentY); currentX += points->at(k + 5); currentY += points->at(k + 6); Loading @@ -310,7 +310,7 @@ void PathResolver::addCommand(SkPath* outPath, char previousCmd, char cmd, case 'A': // Draws an elliptical arc outPath->arcTo(points->at(k + 0), points->at(k + 1), points->at(k + 2), (SkPath::ArcSize) (points->at(k + 3) != 0), (SkPath::Direction) (points->at(k + 4) == 0), (SkPathDirection) (points->at(k + 4) == 0), points->at(k + 5), points->at(k + 6)); currentX = points->at(k + 5); currentY = points->at(k + 6); Loading