diff options
author | Tim Murray <timmurray@google.com> | 2014-02-15 00:03:23 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-02-15 00:03:23 +0000 |
commit | 12623f65275475a13109986f9f993a0887caef9b (patch) | |
tree | 6df487eba783112083a43952f1c5b7cf5a8c76d4 /rs | |
parent | dd615b3c14f9d98d50de0ae5888a4863b6ee2015 (diff) | |
parent | afb4f8f144ef70360b70770e17e7d81571e7b296 (diff) | |
download | frameworks_base-12623f65275475a13109986f9f993a0887caef9b.zip frameworks_base-12623f65275475a13109986f9f993a0887caef9b.tar.gz frameworks_base-12623f65275475a13109986f9f993a0887caef9b.tar.bz2 |
am afb4f8f1: am 8e30d53b: am 4870c813: am 7d1a6c5c: Merge "Fix destruction issues relating to AllocationAdapter."
* commit 'afb4f8f144ef70360b70770e17e7d81571e7b296':
Fix destruction issues relating to AllocationAdapter.
Diffstat (limited to 'rs')
-rw-r--r-- | rs/java/android/renderscript/AllocationAdapter.java | 1 | ||||
-rw-r--r-- | rs/java/android/renderscript/BaseObj.java | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/rs/java/android/renderscript/AllocationAdapter.java b/rs/java/android/renderscript/AllocationAdapter.java index 6c1b1ed..3522a52 100644 --- a/rs/java/android/renderscript/AllocationAdapter.java +++ b/rs/java/android/renderscript/AllocationAdapter.java @@ -219,7 +219,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(); |