diff options
Diffstat (limited to 'rs')
-rw-r--r-- | rs/jni/android_renderscript_RenderScript.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp index c059973ed437..ee48289731a8 100644 --- a/rs/jni/android_renderscript_RenderScript.cpp +++ b/rs/jni/android_renderscript_RenderScript.cpp @@ -1325,12 +1325,10 @@ nAllocationCreateFromBitmap(JNIEnv *_env, jobject _this, jlong con, jlong type, SkBitmap bitmap; GraphicsJNI::getSkBitmap(_env, jbitmap, &bitmap); - bitmap.lockPixels(); const void* ptr = bitmap.getPixels(); jlong id = (jlong)(uintptr_t)rsAllocationCreateFromBitmap((RsContext)con, (RsType)type, (RsAllocationMipmapControl)mip, ptr, bitmap.getSize(), usage); - bitmap.unlockPixels(); return id; } @@ -1341,12 +1339,10 @@ nAllocationCreateBitmapBackedAllocation(JNIEnv *_env, jobject _this, jlong con, SkBitmap bitmap; GraphicsJNI::getSkBitmap(_env, jbitmap, &bitmap); - bitmap.lockPixels(); const void* ptr = bitmap.getPixels(); jlong id = (jlong)(uintptr_t)rsAllocationCreateTyped((RsContext)con, (RsType)type, (RsAllocationMipmapControl)mip, (uint32_t)usage, (uintptr_t)ptr); - bitmap.unlockPixels(); return id; } @@ -1357,12 +1353,10 @@ nAllocationCubeCreateFromBitmap(JNIEnv *_env, jobject _this, jlong con, jlong ty SkBitmap bitmap; GraphicsJNI::getSkBitmap(_env, jbitmap, &bitmap); - bitmap.lockPixels(); const void* ptr = bitmap.getPixels(); jlong id = (jlong)(uintptr_t)rsAllocationCubeCreateFromBitmap((RsContext)con, (RsType)type, (RsAllocationMipmapControl)mip, ptr, bitmap.getSize(), usage); - bitmap.unlockPixels(); return id; } @@ -1374,12 +1368,10 @@ nAllocationCopyFromBitmap(JNIEnv *_env, jobject _this, jlong con, jlong alloc, j int w = bitmap.width(); int h = bitmap.height(); - bitmap.lockPixels(); const void* ptr = bitmap.getPixels(); rsAllocation2DData((RsContext)con, (RsAllocation)alloc, 0, 0, 0, RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X, w, h, ptr, bitmap.getSize(), 0); - bitmap.unlockPixels(); } static void @@ -1388,10 +1380,8 @@ nAllocationCopyToBitmap(JNIEnv *_env, jobject _this, jlong con, jlong alloc, job SkBitmap bitmap; GraphicsJNI::getSkBitmap(_env, jbitmap, &bitmap); - bitmap.lockPixels(); void* ptr = bitmap.getPixels(); rsAllocationCopyToBitmap((RsContext)con, (RsAllocation)alloc, ptr, bitmap.getSize()); - bitmap.unlockPixels(); bitmap.notifyPixelsChanged(); } |