diff options
author | Narayan Kamath <narayan@google.com> | 2014-02-06 11:50:31 +0000 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2014-02-20 12:52:16 +0000 |
commit | 047b938f7188c21c07669108c5c68b2358f6b158 (patch) | |
tree | 78fc2fa7ba516f6458d9f48d642cfadb99be695a | |
parent | 2b3c14bf75c71524a0fcbc3e9d1fdab9aa6c3473 (diff) | |
download | frameworks_base-047b938f7188c21c07669108c5c68b2358f6b158.zip frameworks_base-047b938f7188c21c07669108c5c68b2358f6b158.tar.gz frameworks_base-047b938f7188c21c07669108c5c68b2358f6b158.tar.bz2 |
Fix several bad function definitions.
We claim these functions want jlong as input (8 bytes wide)
but the definitions use pointer types or jints
(4 bytes wide for 32 bit).
bug: 12890271
(cherry picked from 017546e65280a3389b6167f5fc3b5d1c3001154a)
Change-Id: Iede02be90e6a3c9a2db1fe04dcd0db99abe37097
-rw-r--r-- | core/jni/android/graphics/Canvas.cpp | 13 | ||||
-rw-r--r-- | core/jni/android_view_GLES20Canvas.cpp | 6 |
2 files changed, 10 insertions, 9 deletions
diff --git a/core/jni/android/graphics/Canvas.cpp b/core/jni/android/graphics/Canvas.cpp index 89490bc..11089da 100644 --- a/core/jni/android/graphics/Canvas.cpp +++ b/core/jni/android/graphics/Canvas.cpp @@ -321,9 +321,10 @@ public: } static jboolean clipPath(JNIEnv* env, jobject, jlong canvasHandle, - SkPath* path, jint op) { + jlong pathHandle, jint op) { SkCanvas* canvas = reinterpret_cast<SkCanvas*>(canvasHandle); - bool result = canvas->clipPath(*path, static_cast<SkRegion::Op>(op)); + bool result = canvas->clipPath(*reinterpret_cast<SkPath*>(pathHandle), + static_cast<SkRegion::Op>(op)); return result ? JNI_TRUE : JNI_FALSE; } @@ -336,9 +337,9 @@ public: } static void setDrawFilter(JNIEnv* env, jobject, jlong canvasHandle, - SkDrawFilter* filter) { + jlong filterHandle) { SkCanvas* canvas = reinterpret_cast<SkCanvas*>(canvasHandle); - canvas->setDrawFilter(filter); + canvas->setDrawFilter(reinterpret_cast<SkDrawFilter*>(filterHandle)); } static jboolean quickReject__RectF(JNIEnv* env, jobject, jlong canvasHandle, @@ -350,9 +351,9 @@ public: } static jboolean quickReject__Path(JNIEnv* env, jobject, jlong canvasHandle, - SkPath* path) { + jlong pathHandle) { SkCanvas* canvas = reinterpret_cast<SkCanvas*>(canvasHandle); - bool result = canvas->quickReject(*path); + bool result = canvas->quickReject(*reinterpret_cast<SkPath*>(pathHandle)); return result ? JNI_TRUE : JNI_FALSE; } diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp index 118af1b..d3c40cf 100644 --- a/core/jni/android_view_GLES20Canvas.cpp +++ b/core/jni/android_view_GLES20Canvas.cpp @@ -216,9 +216,9 @@ static jint android_view_GLES20Canvas_callDrawGLFunction(JNIEnv* env, jobject cl } static void android_view_GLES20Canvas_detachFunctor(JNIEnv* env, - jobject clazz, jlong rendererHandle, jlong functorHandle) { - OpenGLRenderer* renderer = reinterpret_cast<OpenGLRenderer*>(rendererHandle); - Functor* functor = reinterpret_cast<Functor*>(functorHandle); + jobject clazz, jlong rendererPtr, jlong functorPtr) { + OpenGLRenderer* renderer = reinterpret_cast<OpenGLRenderer*>(rendererPtr); + Functor* functor = reinterpret_cast<Functor*>(functorPtr); renderer->detachFunctor(functor); } |