diff options
author | Miao Wang <miaowang@google.com> | 2015-02-05 00:07:17 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-02-05 00:07:17 +0000 |
commit | 58fd96c607de7f7f821a0b15fd37bc28323fcfde (patch) | |
tree | 12869ff6fafb696963e7f4ec629f85d5e6b61445 | |
parent | af6eaf656ec0de5fcbea03968daffe2c845e2089 (diff) | |
parent | 9a55cbc0523bb05f15a1ea252c6736ce5060c53e (diff) | |
download | frameworks_base-58fd96c607de7f7f821a0b15fd37bc28323fcfde.zip frameworks_base-58fd96c607de7f7f821a0b15fd37bc28323fcfde.tar.gz frameworks_base-58fd96c607de7f7f821a0b15fd37bc28323fcfde.tar.bz2 |
Merge "make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT (Native RS)"
automerge: 9a55cbc
* commit '9a55cbc0523bb05f15a1ea252c6736ce5060c53e':
make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT (Native RS)
-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 3cda6de..69103e8 100644 --- a/rs/java/android/renderscript/Allocation.java +++ b/rs/java/android/renderscript/Allocation.java @@ -1878,4 +1878,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(); + } } |