summaryrefslogtreecommitdiffstats
path: root/rs/java/android
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2015-02-05 00:27:49 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-02-05 00:27:49 +0000
commit4bd2c00d8d27d37c5e90a42ec2e39dd9fdd149eb (patch)
tree179f7bbca4d4e9adbd0be353e3fd164a33b7dcbc /rs/java/android
parentc7e6b93aba9dce93aacb05b5d9f59d09eddb0329 (diff)
parent58fd96c607de7f7f821a0b15fd37bc28323fcfde (diff)
downloadframeworks_base-4bd2c00d8d27d37c5e90a42ec2e39dd9fdd149eb.zip
frameworks_base-4bd2c00d8d27d37c5e90a42ec2e39dd9fdd149eb.tar.gz
frameworks_base-4bd2c00d8d27d37c5e90a42ec2e39dd9fdd149eb.tar.bz2
Merge "make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT (Native RS)" automerge: 9a55cbc
automerge: 58fd96c * commit '58fd96c607de7f7f821a0b15fd37bc28323fcfde': make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT (Native RS)
Diffstat (limited to 'rs/java/android')
-rw-r--r--rs/java/android/renderscript/Allocation.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/rs/java/android/renderscript/Allocation.java b/rs/java/android/renderscript/Allocation.java
index 4e89566..e979a1b 100644
--- a/rs/java/android/renderscript/Allocation.java
+++ b/rs/java/android/renderscript/Allocation.java
@@ -1882,4 +1882,15 @@ public class Allocation extends BaseObj {
}
}
+ /**
+ * For USAGE_IO_OUTPUT, destroy() implies setSurface(null).
+ *
+ */
+ @Override
+ public void destroy() {
+ if((mUsage & USAGE_IO_OUTPUT) != 0) {
+ setSurface(null);
+ }
+ super.destroy();
+ }
}