diff --git a/gradle.properties b/gradle.properties index fe72b25..bc7ce06 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=dev.romainguy -VERSION_NAME=0.6.0 +VERSION_NAME=0.7.0 SONATYPE_HOST=S01 RELEASE_SIGNING_ENABLED=true diff --git a/pathway/build.gradle b/pathway/build.gradle index 26b771d..8bf3100 100644 --- a/pathway/build.gradle +++ b/pathway/build.gradle @@ -8,12 +8,12 @@ group = GROUP version = VERSION_NAME android { - compileSdk 31 - ndkVersion '23.1.7779620' + compileSdk 33 + ndkVersion '25.0.8775105' defaultConfig { minSdk 21 - targetSdk 31 + targetSdk 33 externalNativeBuild { cmake { @@ -36,7 +36,7 @@ android { externalNativeBuild { cmake { path file('src/main/cpp/CMakeLists.txt') - version '3.18.1' + version '3.22.1' } } } diff --git a/pathway/src/main/cpp/pathway.cpp b/pathway/src/main/cpp/pathway.cpp index 9d48800..65add0f 100644 --- a/pathway/src/main/cpp/pathway.cpp +++ b/pathway/src/main/cpp/pathway.cpp @@ -111,31 +111,8 @@ static jint pathIteratorNext( Verb verb = pathIterator->next(pointsData); if (verb != Verb::Done && verb != Verb::Close) { - auto* pointsArray = static_cast(env->GetPrimitiveArrayCritical(points_, nullptr)); - jfloat* points = pointsArray + offset_; - switch (verb) { - case Verb::Cubic: - case Verb::Conic: // to copy the weight - points[6] = pointsData[3].x; - points[7] = pointsData[3].y; - case Verb::Quadratic: - points[4] = pointsData[2].x; - points[5] = pointsData[2].y; - case Verb::Move: - case Verb::Line: - points[2] = pointsData[1].x; - points[3] = pointsData[1].y; - points[0] = pointsData[0].x; - points[1] = pointsData[0].y; - break; -#pragma clang diagnostic push -#pragma ide diagnostic ignored "UnreachableCode" - case Verb::Close: - case Verb::Done: - break; -#pragma clang diagnostic pop - } - env->ReleasePrimitiveArrayCritical(points_, pointsArray, 0); + auto* floatsData = reinterpret_cast(pointsData); + env->SetFloatArrayRegion(points_, offset_, 8, floatsData); } return static_cast(verb);