summaryrefslogtreecommitdiffstats
path: root/rs/java
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2014-02-14 15:53:59 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-14 15:53:59 -0800
commit4870c813fe4a6fc7a176f22b5e7f96e9f7a4e469 (patch)
treeb732714564e9167c85d1ed520ca8edb930975435 /rs/java
parentda37944785c47b2b92c1a0f79c5d602256859fe6 (diff)
parent7d1a6c5cac16795e5953d2b4d34671e34e907632 (diff)
downloadframeworks_base-4870c813fe4a6fc7a176f22b5e7f96e9f7a4e469.zip
frameworks_base-4870c813fe4a6fc7a176f22b5e7f96e9f7a4e469.tar.gz
frameworks_base-4870c813fe4a6fc7a176f22b5e7f96e9f7a4e469.tar.bz2
am 7d1a6c5c: Merge "Fix destruction issues relating to AllocationAdapter."
* commit '7d1a6c5cac16795e5953d2b4d34671e34e907632': Fix destruction issues relating to AllocationAdapter.
Diffstat (limited to 'rs/java')
-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();