Allocation API update.
Change-Id: I9b4a71f9e94c7d3978f06b7971051ab4f8472503
diff --git a/libs/rs/rsAllocation.h b/libs/rs/rsAllocation.h
index 5b432f2..e63c7ab 100644
--- a/libs/rs/rsAllocation.h
+++ b/libs/rs/rsAllocation.h
@@ -29,7 +29,7 @@
// The graphics equilivent of malloc. The allocation contains a structure of elements.
public:
- Allocation(Context *rsc, const Type *);
+ Allocation(Context *rsc, const Type *, uint32_t usages);
Allocation(Context *rsc, const Type *, void *bmp, void *callbackData, RsBitmapCallback_t callback);
virtual ~Allocation();
@@ -44,6 +44,8 @@
void * getPtr() const {return mPtr;}
const Type * getType() const {return mType.get();}
+ void syncAll(Context *rsc, RsAllocationUsageType src);
+
void deferedUploadToTexture(const Context *rsc, bool genMipmap, uint32_t lodOffset);
void uploadToTexture(const Context *rsc);
uint32_t getTextureID() const {return mTextureID;}
@@ -84,7 +86,7 @@
virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_ALLOCATION; }
static Allocation *createFromStream(Context *rsc, IStream *stream);
- virtual void uploadCheck(const Context *rsc);
+ virtual void uploadCheck(Context *rsc);
bool getIsTexture() const {return mIsTexture;}
bool getIsBufferObject() const {return mIsVertexBuffer;}
@@ -112,6 +114,8 @@
bool mGpuWrite;
bool mGpuRead;
+ uint32_t mUsageFlags;
+
// more usage hint data from the application
// which can be used by a driver to pick the best memory type.
// Likely ignored for now