diff options
Diffstat (limited to 'libs/rs/rsAllocation.h')
| -rw-r--r-- | libs/rs/rsAllocation.h | 8 |
1 files changed, 6 insertions, 2 deletions
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 @@ class Allocation : public ObjectBase { // 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 @@ public: 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 @@ public: 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 @@ protected: 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 |
