OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31fb17b
)
Destroy Allocation right away on exception
author
Yang Ni
<yangni@google.com>
Fri, 28 Apr 2017 15:49:01 +0000
(08:49 -0700)
committer
Yang Ni
<yangni@google.com>
Fri, 5 May 2017 15:32:34 +0000
(15:32 +0000)
Bug:
28053584
To avoid holding the resource (surface) for too long.
Test: CTS on x86_64 emulator
Change-Id: I2fdec107c2a16b7dadbf78a9aee79c33423a3676
rs/java/android/renderscript/Allocation.java
patch
|
blob
|
history
diff --git
a/rs/java/android/renderscript/Allocation.java
b/rs/java/android/renderscript/Allocation.java
index
05ad161
..
238bf0f
100644
(file)
--- a/
rs/java/android/renderscript/Allocation.java
+++ b/
rs/java/android/renderscript/Allocation.java
@@
-2895,6
+2895,7
@@
public class Allocation extends BaseObj {
mAllocationArray[0] = createTyped(rs, t, usage);
if ((usage & USAGE_IO_INPUT) != 0) {
if (numAlloc > MAX_NUMBER_IO_INPUT_ALLOC) {
+ mAllocationArray[0].destroy();
throw new RSIllegalArgumentException("Exceeds the max number of Allocations allowed: " +
MAX_NUMBER_IO_INPUT_ALLOC);
}