diff options
author | Mike Reed <reed@google.com> | 2017-10-06 16:25:49 -0400 |
---|---|---|
committer | Mike Reed <reed@google.com> | 2017-10-06 16:25:55 -0400 |
commit | 7569de0f90959b7eb9b432cc349425ab6d27f6cc (patch) | |
tree | 7eef77ed4823bace5e987c10ebde03e337424c0f /rs | |
parent | 771f811c38b1dd2a8cdcb51c0f97e9364a3edb0f (diff) |
switch to new API for compute image size
Test: make
Change-Id: Ie3a5d068bef1c2a1790ab227f6398695aee11cf7
Diffstat (limited to 'rs')
-rw-r--r-- | rs/jni/android_renderscript_RenderScript.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp index f9f6bf7dbcab..b32be736533b 100644 --- a/rs/jni/android_renderscript_RenderScript.cpp +++ b/rs/jni/android_renderscript_RenderScript.cpp @@ -1328,7 +1328,7 @@ nAllocationCreateFromBitmap(JNIEnv *_env, jobject _this, jlong con, jlong type, const void* ptr = bitmap.getPixels(); jlong id = (jlong)(uintptr_t)rsAllocationCreateFromBitmap((RsContext)con, (RsType)type, (RsAllocationMipmapControl)mip, - ptr, bitmap.getSize(), usage); + ptr, bitmap.computeByteSize(), usage); return id; } @@ -1356,7 +1356,7 @@ nAllocationCubeCreateFromBitmap(JNIEnv *_env, jobject _this, jlong con, jlong ty const void* ptr = bitmap.getPixels(); jlong id = (jlong)(uintptr_t)rsAllocationCubeCreateFromBitmap((RsContext)con, (RsType)type, (RsAllocationMipmapControl)mip, - ptr, bitmap.getSize(), usage); + ptr, bitmap.computeByteSize(), usage); return id; } @@ -1371,7 +1371,7 @@ nAllocationCopyFromBitmap(JNIEnv *_env, jobject _this, jlong con, jlong alloc, j 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); + w, h, ptr, bitmap.computeByteSize(), 0); } static void @@ -1381,7 +1381,7 @@ nAllocationCopyToBitmap(JNIEnv *_env, jobject _this, jlong con, jlong alloc, job GraphicsJNI::getSkBitmap(_env, jbitmap, &bitmap); void* ptr = bitmap.getPixels(); - rsAllocationCopyToBitmap((RsContext)con, (RsAllocation)alloc, ptr, bitmap.getSize()); + rsAllocationCopyToBitmap((RsContext)con, (RsAllocation)alloc, ptr, bitmap.computeByteSize()); bitmap.notifyPixelsChanged(); } |