diff options
Diffstat (limited to 'libs/rs/rsAllocation.h')
-rw-r--r-- | libs/rs/rsAllocation.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libs/rs/rsAllocation.h b/libs/rs/rsAllocation.h index 67fc3b5..714798a 100644 --- a/libs/rs/rsAllocation.h +++ b/libs/rs/rsAllocation.h @@ -41,7 +41,7 @@ public: void * drv; struct State { - ObjectBaseRef<const Type> type; + const Type * type; uint32_t usageFlags; RsAllocationMipmapControl mipmapControl; @@ -71,7 +71,7 @@ public: void updateCache(); void * getPtr() const {return mHal.drvState.mallocPtr;} - const Type * getType() const {return mHal.state.type.get();} + const Type * getType() const {return mHal.state.type;} void syncAll(Context *rsc, RsAllocationUsageType src); @@ -126,6 +126,11 @@ public: protected: Vector<const Program *> mToDirtyList; + ObjectBaseRef<const Type> mType; + void setType(const Type *t) { + mType.set(t); + mHal.state.type = t; + } private: void freeChildrenUnlocked(); |