Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4870c813 authored by Tim Murray's avatar Tim Murray Committed by Android Git Automerger
Browse files

am 7d1a6c5c: Merge "Fix destruction issues relating to AllocationAdapter."

* commit '7d1a6c5c':
  Fix destruction issues relating to AllocationAdapter.
parents da379447 7d1a6c5c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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();