summaryrefslogtreecommitdiff
path: root/libs/rs/rsAllocation.h
diff options
context:
space:
mode:
author Alex Sakhartchouk <alexst@google.com> 2011-04-01 14:19:01 -0700
committer Alex Sakhartchouk <alexst@google.com> 2011-04-01 14:19:01 -0700
commit8e90f2bc1fa35a2dc7bd2aab8b8241b628800218 (patch)
treec2b3e36a41b00d7ef8be23d6441ff44893f686ab /libs/rs/rsAllocation.h
parent397de169e5462bf0c62506827819f93336b3f123 (diff)
First draft of fbo in renderscript.
Updating samples and benchmark Change-Id: I469bf8b842fca72b59475c8fa024c12cf0e14954
Diffstat (limited to 'libs/rs/rsAllocation.h')
-rw-r--r--libs/rs/rsAllocation.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/libs/rs/rsAllocation.h b/libs/rs/rsAllocation.h
index e63140c78666..d3348410fb8e 100644
--- a/libs/rs/rsAllocation.h
+++ b/libs/rs/rsAllocation.h
@@ -71,13 +71,17 @@ public:
void syncAll(Context *rsc, RsAllocationUsageType src);
- void deferedUploadToTexture(const Context *rsc);
+ void deferredUploadToTexture(const Context *rsc);
void uploadToTexture(const Context *rsc);
uint32_t getTextureID() const {return mTextureID;}
+ void deferredAllocateRenderTarget(const Context *rsc);
+ void allocateRenderTarget(const Context *rsc);
+ uint32_t getRenderTargetID() const {return mRenderTargetID;}
+
uint32_t getGLTarget() const;
- void deferedUploadToBufferObject(const Context *rsc);
+ void deferredUploadToBufferObject(const Context *rsc);
void uploadToBufferObject(const Context *rsc);
uint32_t getBufferObjectID() const {return mBufferID;}
@@ -118,6 +122,9 @@ public:
bool getIsTexture() const {
return (mHal.state.usageFlags & RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE) != 0;
}
+ bool getIsRenderTarget() const {
+ return (mHal.state.usageFlags & RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET) != 0;
+ }
bool getIsBufferObject() const {
return (mHal.state.usageFlags & RS_ALLOCATION_USAGE_GRAPHICS_VERTEX) != 0;
}
@@ -161,7 +168,10 @@ protected:
// is allowed.
uint32_t mBufferID;
- bool mUploadDefered;
+ // Is this a legal structure to be used as an FBO render target
+ uint32_t mRenderTargetID;
+
+ bool mUploadDeferred;
private:
void init(Context *rsc, const Type *);