summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2015-02-05 00:07:17 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-02-05 00:07:17 +0000
commit58fd96c607de7f7f821a0b15fd37bc28323fcfde (patch)
tree12869ff6fafb696963e7f4ec629f85d5e6b61445
parentaf6eaf656ec0de5fcbea03968daffe2c845e2089 (diff)
parent9a55cbc0523bb05f15a1ea252c6736ce5060c53e (diff)
downloadframeworks_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.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 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();
+ }
}