diff options
author | Miao Wang <miaowang@google.com> | 2015-02-05 00:27:49 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-02-05 00:27:49 +0000 |
commit | 4bd2c00d8d27d37c5e90a42ec2e39dd9fdd149eb (patch) | |
tree | 179f7bbca4d4e9adbd0be353e3fd164a33b7dcbc /rs/java/android | |
parent | c7e6b93aba9dce93aacb05b5d9f59d09eddb0329 (diff) | |
parent | 58fd96c607de7f7f821a0b15fd37bc28323fcfde (diff) | |
download | frameworks_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.java | 11 |
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(); + } } |