diff options
author | Xin Li <delphij@google.com> | 2020-09-09 20:21:10 -0700 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2020-09-09 20:21:10 -0700 |
commit | c64112eb974e9aa7638aead998f07a868acfb5a7 (patch) | |
tree | 503334edcee47bfd9f7a76d987d881992ecae9aa /rs/java/android/renderscript/RenderScript.java | |
parent | 104d2f92b3911576c284ddb0adf78148359883d2 (diff) | |
parent | 14a6871e432e163533a320516ace97bd67d9c3a0 (diff) |
Merge Android R
Bug: 168057903
Merged-In: Ice3e441cc9c0df8d0a6acc016bb74375e081bd67
Change-Id: I1d85742f594be2007c99841b290e502b6ede624e
Diffstat (limited to 'rs/java/android/renderscript/RenderScript.java')
-rw-r--r-- | rs/java/android/renderscript/RenderScript.java | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java index 46c49e5a5e11..39efe731ce8a 100644 --- a/rs/java/android/renderscript/RenderScript.java +++ b/rs/java/android/renderscript/RenderScript.java @@ -447,44 +447,33 @@ public class RenderScript { validate(); return rsnAllocationCreateTyped(mContext, type, mip, usage, pointer); } - native long rsnAllocationCreateFromBitmap(long con, long type, int mip, long bitmapHandle, + + native long rsnAllocationCreateFromBitmap(long con, long type, int mip, Bitmap bmp, int usage); synchronized long nAllocationCreateFromBitmap(long type, int mip, Bitmap bmp, int usage) { validate(); - return rsnAllocationCreateFromBitmap(mContext, type, mip, bmp.getNativeInstance(), usage); + return rsnAllocationCreateFromBitmap(mContext, type, mip, bmp, usage); } - native long rsnAllocationCreateBitmapBackedAllocation(long con, long type, int mip, long bitmapHandle, + native long rsnAllocationCreateBitmapBackedAllocation(long con, long type, int mip, Bitmap bmp, int usage); synchronized long nAllocationCreateBitmapBackedAllocation(long type, int mip, Bitmap bmp, int usage) { validate(); - return rsnAllocationCreateBitmapBackedAllocation(mContext, type, mip, bmp.getNativeInstance(), - usage); + return rsnAllocationCreateBitmapBackedAllocation(mContext, type, mip, bmp, usage); } - native long rsnAllocationCubeCreateFromBitmap(long con, long type, int mip, long bitmapHandle, + native long rsnAllocationCubeCreateFromBitmap(long con, long type, int mip, Bitmap bmp, int usage); synchronized long nAllocationCubeCreateFromBitmap(long type, int mip, Bitmap bmp, int usage) { validate(); - return rsnAllocationCubeCreateFromBitmap(mContext, type, mip, bmp.getNativeInstance(), - usage); - } - native long rsnAllocationCreateBitmapRef(long con, long type, long bitmapHandle); - synchronized long nAllocationCreateBitmapRef(long type, Bitmap bmp) { - validate(); - return rsnAllocationCreateBitmapRef(mContext, type, bmp.getNativeInstance()); - } - native long rsnAllocationCreateFromAssetStream(long con, int mips, int assetStream, int usage); - synchronized long nAllocationCreateFromAssetStream(int mips, int assetStream, int usage) { - validate(); - return rsnAllocationCreateFromAssetStream(mContext, mips, assetStream, usage); + return rsnAllocationCubeCreateFromBitmap(mContext, type, mip, bmp, usage); } - native void rsnAllocationCopyToBitmap(long con, long alloc, long bitmapHandle); + native void rsnAllocationCopyToBitmap(long con, long alloc, Bitmap bmp); synchronized void nAllocationCopyToBitmap(long alloc, Bitmap bmp) { validate(); - rsnAllocationCopyToBitmap(mContext, alloc, bmp.getNativeInstance()); + rsnAllocationCopyToBitmap(mContext, alloc, bmp); } native void rsnAllocationSyncAll(long con, long alloc, int src); @@ -537,10 +526,10 @@ public class RenderScript { validate(); rsnAllocationGenerateMipmaps(mContext, alloc); } - native void rsnAllocationCopyFromBitmap(long con, long alloc, long bitmapHandle); + native void rsnAllocationCopyFromBitmap(long con, long alloc, Bitmap bmp); synchronized void nAllocationCopyFromBitmap(long alloc, Bitmap bmp) { validate(); - rsnAllocationCopyFromBitmap(mContext, alloc, bmp.getNativeInstance()); + rsnAllocationCopyFromBitmap(mContext, alloc, bmp); } |