diff options
Diffstat (limited to 'rs/jni/android_renderscript_RenderScript.cpp')
-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 0acbb0258944..f6d3f4835381 100644 --- a/rs/jni/android_renderscript_RenderScript.cpp +++ b/rs/jni/android_renderscript_RenderScript.cpp @@ -1324,12 +1324,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; } @@ -1340,12 +1338,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; } @@ -1356,12 +1352,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; } @@ -1373,12 +1367,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 @@ -1387,10 +1379,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(); } |