diff options
| author | Jason Sams <rjsams@android.com> | 2010-12-08 16:14:36 -0800 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2010-12-08 16:14:36 -0800 |
| commit | 5476b450e50939940dcf3f15c92335cee2fc572d (patch) | |
| tree | 2129f5a5abfdfa6d43ae3e884d759d4614604c41 /libs/rs/rsAllocation.h | |
| parent | af8962e48ecf0ff3833084f540ca7e2f05295560 (diff) | |
| download | frameworks_base-5476b450e50939940dcf3f15c92335cee2fc572d.zip frameworks_base-5476b450e50939940dcf3f15c92335cee2fc572d.tar.gz frameworks_base-5476b450e50939940dcf3f15c92335cee2fc572d.tar.bz2 | |
Allocation API update.
Change-Id: I9b4a71f9e94c7d3978f06b7971051ab4f8472503
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 |
