Loading libs/hwui/jni/Interpolator.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -24,12 +24,8 @@ static void Interpolator_setKeyFrame(JNIEnv* env, jobject clazz, jlong interpHan AutoJavaFloatArray autoValues(env, valueArray); AutoJavaFloatArray autoBlend(env, blendArray, 4); #ifdef SK_SCALAR_IS_FLOAT SkScalar* scalars = autoValues.ptr(); SkScalar* blend = autoBlend.ptr(); #else #error Need to convert float array to SkScalar array before calling the following function. #endif interp->setKeyFrame(index, msec, scalars, blend); } Loading libs/hwui/jni/Path.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -182,11 +182,7 @@ public: SkPath* obj = reinterpret_cast<SkPath*>(objHandle); SkPathDirection dir = static_cast<SkPathDirection>(dirHandle); AutoJavaFloatArray afa(env, array, 8); #ifdef SK_SCALAR_IS_FLOAT const float* src = afa.ptr(); #else #error Need to convert float array to SkScalar array before calling the following function. #endif obj->addRoundRect(rect, src, dir); } Loading libs/hwui/jni/PathEffect.cpp +1 −5 Original line number Diff line number Diff line Loading @@ -35,11 +35,7 @@ public: jfloatArray intervalArray, jfloat phase) { AutoJavaFloatArray autoInterval(env, intervalArray); int count = autoInterval.length() & ~1; // even number #ifdef SK_SCALAR_IS_FLOAT SkScalar* intervals = autoInterval.ptr(); #else #error Need to convert float array to SkScalar array before calling the following function. #endif SkPathEffect* effect = SkDashPathEffect::Make(intervals, count, phase).release(); return reinterpret_cast<jlong>(effect); } Loading libs/hwui/jni/Shader.cpp +1 −18 Original line number Diff line number Diff line Loading @@ -52,12 +52,7 @@ static void Color_RGBToHSV(JNIEnv* env, jobject, jint red, jint green, jint blue static jint Color_HSVToColor(JNIEnv* env, jobject, jint alpha, jfloatArray hsvArray) { AutoJavaFloatArray autoHSV(env, hsvArray, 3); #ifdef SK_SCALAR_IS_FLOAT SkScalar* hsv = autoHSV.ptr(); #else #error Need to convert float array to SkScalar array before calling the following function. #endif return static_cast<jint>(SkHSVToColor(alpha, hsv)); } Loading Loading @@ -149,11 +144,7 @@ static jlong LinearGradient_create(JNIEnv* env, jobject, jlong matrixPtr, std::vector<SkColor4f> colors = convertColorLongs(env, colorArray); AutoJavaFloatArray autoPos(env, posArray, colors.size()); #ifdef SK_SCALAR_IS_FLOAT SkScalar* pos = autoPos.ptr(); #else #error Need to convert float array to SkScalar array before calling the following function. #endif sk_sp<SkShader> shader(SkGradientShader::MakeLinear(pts, &colors[0], GraphicsJNI::getNativeColorSpace(colorSpaceHandle), pos, colors.size(), Loading Loading @@ -193,11 +184,7 @@ static jlong RadialGradient_create(JNIEnv* env, std::vector<SkColor4f> colors = convertColorLongs(env, colorArray); AutoJavaFloatArray autoPos(env, posArray, colors.size()); #ifdef SK_SCALAR_IS_FLOAT SkScalar* pos = autoPos.ptr(); #else #error Need to convert float array to SkScalar array before calling the following function. #endif auto colorSpace = GraphicsJNI::getNativeColorSpace(colorSpaceHandle); auto skTileMode = static_cast<SkTileMode>(tileMode); Loading Loading @@ -225,11 +212,7 @@ static jlong SweepGradient_create(JNIEnv* env, jobject, jlong matrixPtr, jfloat std::vector<SkColor4f> colors = convertColorLongs(env, colorArray); AutoJavaFloatArray autoPos(env, jpositions, colors.size()); #ifdef SK_SCALAR_IS_FLOAT SkScalar* pos = autoPos.ptr(); #else #error Need to convert float array to SkScalar array before calling the following function. #endif sk_sp<SkShader> shader = SkGradientShader::MakeSweep(x, y, &colors[0], GraphicsJNI::getNativeColorSpace(colorSpaceHandle), pos, colors.size(), Loading libs/hwui/jni/android_graphics_Matrix.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -23,8 +23,6 @@ namespace android { static_assert(sizeof(SkMatrix) == 40, "Unexpected sizeof(SkMatrix), " "update size in Matrix.java#NATIVE_ALLOCATION_SIZE and here"); static_assert(SK_SCALAR_IS_FLOAT, "SK_SCALAR_IS_FLOAT is false, " "only float scalar is supported"); class SkMatrixGlue { public: Loading Loading
libs/hwui/jni/Interpolator.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -24,12 +24,8 @@ static void Interpolator_setKeyFrame(JNIEnv* env, jobject clazz, jlong interpHan AutoJavaFloatArray autoValues(env, valueArray); AutoJavaFloatArray autoBlend(env, blendArray, 4); #ifdef SK_SCALAR_IS_FLOAT SkScalar* scalars = autoValues.ptr(); SkScalar* blend = autoBlend.ptr(); #else #error Need to convert float array to SkScalar array before calling the following function. #endif interp->setKeyFrame(index, msec, scalars, blend); } Loading
libs/hwui/jni/Path.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -182,11 +182,7 @@ public: SkPath* obj = reinterpret_cast<SkPath*>(objHandle); SkPathDirection dir = static_cast<SkPathDirection>(dirHandle); AutoJavaFloatArray afa(env, array, 8); #ifdef SK_SCALAR_IS_FLOAT const float* src = afa.ptr(); #else #error Need to convert float array to SkScalar array before calling the following function. #endif obj->addRoundRect(rect, src, dir); } Loading
libs/hwui/jni/PathEffect.cpp +1 −5 Original line number Diff line number Diff line Loading @@ -35,11 +35,7 @@ public: jfloatArray intervalArray, jfloat phase) { AutoJavaFloatArray autoInterval(env, intervalArray); int count = autoInterval.length() & ~1; // even number #ifdef SK_SCALAR_IS_FLOAT SkScalar* intervals = autoInterval.ptr(); #else #error Need to convert float array to SkScalar array before calling the following function. #endif SkPathEffect* effect = SkDashPathEffect::Make(intervals, count, phase).release(); return reinterpret_cast<jlong>(effect); } Loading
libs/hwui/jni/Shader.cpp +1 −18 Original line number Diff line number Diff line Loading @@ -52,12 +52,7 @@ static void Color_RGBToHSV(JNIEnv* env, jobject, jint red, jint green, jint blue static jint Color_HSVToColor(JNIEnv* env, jobject, jint alpha, jfloatArray hsvArray) { AutoJavaFloatArray autoHSV(env, hsvArray, 3); #ifdef SK_SCALAR_IS_FLOAT SkScalar* hsv = autoHSV.ptr(); #else #error Need to convert float array to SkScalar array before calling the following function. #endif return static_cast<jint>(SkHSVToColor(alpha, hsv)); } Loading Loading @@ -149,11 +144,7 @@ static jlong LinearGradient_create(JNIEnv* env, jobject, jlong matrixPtr, std::vector<SkColor4f> colors = convertColorLongs(env, colorArray); AutoJavaFloatArray autoPos(env, posArray, colors.size()); #ifdef SK_SCALAR_IS_FLOAT SkScalar* pos = autoPos.ptr(); #else #error Need to convert float array to SkScalar array before calling the following function. #endif sk_sp<SkShader> shader(SkGradientShader::MakeLinear(pts, &colors[0], GraphicsJNI::getNativeColorSpace(colorSpaceHandle), pos, colors.size(), Loading Loading @@ -193,11 +184,7 @@ static jlong RadialGradient_create(JNIEnv* env, std::vector<SkColor4f> colors = convertColorLongs(env, colorArray); AutoJavaFloatArray autoPos(env, posArray, colors.size()); #ifdef SK_SCALAR_IS_FLOAT SkScalar* pos = autoPos.ptr(); #else #error Need to convert float array to SkScalar array before calling the following function. #endif auto colorSpace = GraphicsJNI::getNativeColorSpace(colorSpaceHandle); auto skTileMode = static_cast<SkTileMode>(tileMode); Loading Loading @@ -225,11 +212,7 @@ static jlong SweepGradient_create(JNIEnv* env, jobject, jlong matrixPtr, jfloat std::vector<SkColor4f> colors = convertColorLongs(env, colorArray); AutoJavaFloatArray autoPos(env, jpositions, colors.size()); #ifdef SK_SCALAR_IS_FLOAT SkScalar* pos = autoPos.ptr(); #else #error Need to convert float array to SkScalar array before calling the following function. #endif sk_sp<SkShader> shader = SkGradientShader::MakeSweep(x, y, &colors[0], GraphicsJNI::getNativeColorSpace(colorSpaceHandle), pos, colors.size(), Loading
libs/hwui/jni/android_graphics_Matrix.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -23,8 +23,6 @@ namespace android { static_assert(sizeof(SkMatrix) == 40, "Unexpected sizeof(SkMatrix), " "update size in Matrix.java#NATIVE_ALLOCATION_SIZE and here"); static_assert(SK_SCALAR_IS_FLOAT, "SK_SCALAR_IS_FLOAT is false, " "only float scalar is supported"); class SkMatrixGlue { public: Loading