diff options
Diffstat (limited to 'core/jni/android_view_ThreadedRenderer.cpp')
-rw-r--r-- | core/jni/android_view_ThreadedRenderer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/jni/android_view_ThreadedRenderer.cpp b/core/jni/android_view_ThreadedRenderer.cpp index 11b3805..4ccbb41 100644 --- a/core/jni/android_view_ThreadedRenderer.cpp +++ b/core/jni/android_view_ThreadedRenderer.cpp @@ -21,6 +21,7 @@ #include "jni.h" #include <nativehelper/JNIHelp.h> #include "core_jni_helpers.h" +#include <GraphicsJNI.h> #include <ScopedPrimitiveArray.h> #include <EGL/egl.h> @@ -347,10 +348,11 @@ static void android_view_ThreadedRenderer_buildLayer(JNIEnv* env, jobject clazz, } static jboolean android_view_ThreadedRenderer_copyLayerInto(JNIEnv* env, jobject clazz, - jlong proxyPtr, jlong layerPtr, jlong bitmapPtr) { + jlong proxyPtr, jlong layerPtr, jobject jbitmap) { RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr); DeferredLayerUpdater* layer = reinterpret_cast<DeferredLayerUpdater*>(layerPtr); - SkBitmap* bitmap = reinterpret_cast<SkBitmap*>(bitmapPtr); + SkBitmap bitmap; + GraphicsJNI::getSkBitmap(env, jbitmap, &bitmap); return proxy->copyLayerInto(layer, bitmap); } @@ -458,7 +460,7 @@ static JNINativeMethod gMethods[] = { { "nInvokeFunctor", "(JZ)V", (void*) android_view_ThreadedRenderer_invokeFunctor }, { "nCreateTextureLayer", "(J)J", (void*) android_view_ThreadedRenderer_createTextureLayer }, { "nBuildLayer", "(JJ)V", (void*) android_view_ThreadedRenderer_buildLayer }, - { "nCopyLayerInto", "(JJJ)Z", (void*) android_view_ThreadedRenderer_copyLayerInto }, + { "nCopyLayerInto", "(JJLandroid/graphics/Bitmap;)Z", (void*) android_view_ThreadedRenderer_copyLayerInto }, { "nPushLayerUpdate", "(JJ)V", (void*) android_view_ThreadedRenderer_pushLayerUpdate }, { "nCancelLayerUpdate", "(JJ)V", (void*) android_view_ThreadedRenderer_cancelLayerUpdate }, { "nDetachSurfaceTexture", "(JJ)V", (void*) android_view_ThreadedRenderer_detachSurfaceTexture }, |