summaryrefslogtreecommitdiffstats
path: root/rs
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2014-08-18 16:14:24 -0700
committerTim Murray <timmurray@google.com>2014-08-18 18:14:32 -0700
commitb730d866a0f4f56c103420f818f7f5ec6b8fd618 (patch)
tree7274177f5d55c10d8f654ee288b3e780a98a8fb7 /rs
parent823fd3c79dd4f762bbc778e0ce9e2204b6d3d454 (diff)
downloadframeworks_base-b730d866a0f4f56c103420f818f7f5ec6b8fd618.zip
frameworks_base-b730d866a0f4f56c103420f818f7f5ec6b8fd618.tar.gz
frameworks_base-b730d866a0f4f56c103420f818f7f5ec6b8fd618.tar.bz2
Fix IO_INPUT with 64-bit.
bug 16846318 bug 17006933 Change-Id: Ic13ef26875d8a6fab1ffb542d62038b768a536ff
Diffstat (limited to 'rs')
-rw-r--r--rs/java/android/renderscript/Allocation.java2
-rw-r--r--rs/java/android/renderscript/RenderScript.java7
2 files changed, 7 insertions, 2 deletions
diff --git a/rs/java/android/renderscript/Allocation.java b/rs/java/android/renderscript/Allocation.java
index 7db85f2..3cda6de 100644
--- a/rs/java/android/renderscript/Allocation.java
+++ b/rs/java/android/renderscript/Allocation.java
@@ -1868,7 +1868,7 @@ public class Allocation extends BaseObj {
}
}
- static void sendBufferNotification(int id) {
+ static void sendBufferNotification(long id) {
synchronized(mAllocationMap) {
Allocation a = mAllocationMap.get(new Long(id));
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java
index 340efef..6c5c508 100644
--- a/rs/java/android/renderscript/RenderScript.java
+++ b/rs/java/android/renderscript/RenderScript.java
@@ -1156,7 +1156,12 @@ public class RenderScript {
}
if (msg == RS_MESSAGE_TO_CLIENT_NEW_BUFFER) {
- Allocation.sendBufferNotification(subID);
+ if (mRS.nContextGetUserMessage(mRS.mContext, rbuf) !=
+ RS_MESSAGE_TO_CLIENT_NEW_BUFFER) {
+ throw new RSDriverException("Error processing message from RenderScript.");
+ }
+ long bufferID = ((long)rbuf[1] << 32L) + ((long)rbuf[0] & 0xffffffffL);
+ Allocation.sendBufferNotification(bufferID);
continue;
}