summaryrefslogtreecommitdiffstats
path: root/rs
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2014-02-15 00:00:07 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-15 00:00:07 +0000
commitafb4f8f144ef70360b70770e17e7d81571e7b296 (patch)
treea1c4a7ae9de3eda977867b1ee70369b0fc95f8c8 /rs
parentd6739e0f9dd0a5c633ed3cf484f8c0f723168757 (diff)
parent8e30d53b6575a08ec0579fb08c8c4f055598d78b (diff)
downloadframeworks_base-afb4f8f144ef70360b70770e17e7d81571e7b296.zip
frameworks_base-afb4f8f144ef70360b70770e17e7d81571e7b296.tar.gz
frameworks_base-afb4f8f144ef70360b70770e17e7d81571e7b296.tar.bz2
am 8e30d53b: am 4870c813: am 7d1a6c5c: Merge "Fix destruction issues relating to AllocationAdapter."
* commit '8e30d53b6575a08ec0579fb08c8c4f055598d78b': Fix destruction issues relating to AllocationAdapter.
Diffstat (limited to 'rs')
-rw-r--r--rs/java/android/renderscript/AllocationAdapter.java1
-rw-r--r--rs/java/android/renderscript/BaseObj.java3
2 files changed, 2 insertions, 2 deletions
diff --git a/rs/java/android/renderscript/AllocationAdapter.java b/rs/java/android/renderscript/AllocationAdapter.java
index b77d087..fd20cae 100644
--- a/rs/java/android/renderscript/AllocationAdapter.java
+++ b/rs/java/android/renderscript/AllocationAdapter.java
@@ -224,7 +224,6 @@ public class AllocationAdapter extends Allocation {
}
static public AllocationAdapter create2D(RenderScript rs, Allocation a) {
- android.util.Log.e("rs", "create2d " + a);
rs.validate();
AllocationAdapter aa = new AllocationAdapter(0, rs, a);
aa.mConstrainedLOD = true;
diff --git a/rs/java/android/renderscript/BaseObj.java b/rs/java/android/renderscript/BaseObj.java
index 842aa23..b386dd7 100644
--- a/rs/java/android/renderscript/BaseObj.java
+++ b/rs/java/android/renderscript/BaseObj.java
@@ -122,7 +122,8 @@ public class BaseObj {
// must include nObjDestroy in the critical section
ReentrantReadWriteLock.ReadLock rlock = mRS.mRWLock.readLock();
rlock.lock();
- if(mRS.isAlive()) {
+ // AllocationAdapters are BaseObjs with an ID of 0 but should not be passed to nObjDestroy
+ if(mRS.isAlive() && mID != 0) {
mRS.nObjDestroy(mID);
}
rlock.unlock();