Remove ObjBaseRef from the hal struct
Change-Id: Idcac14ecfdd4d06a0f54bf50e3b9657be62e6638
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 @@
void * drv;
struct State {
- ObjectBaseRef<const Type> type;
+ const Type * type;
uint32_t usageFlags;
RsAllocationMipmapControl mipmapControl;
@@ -71,7 +71,7 @@
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 @@
protected:
Vector<const Program *> mToDirtyList;
+ ObjectBaseRef<const Type> mType;
+ void setType(const Type *t) {
+ mType.set(t);
+ mHal.state.type = t;
+ }
private:
void freeChildrenUnlocked();