summaryrefslogtreecommitdiffstats
path: root/include/ui/GraphicBuffer.h
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-10-26 20:12:37 -0700
committerMathias Agopian <mathias@google.com>2009-10-27 13:13:29 -0700
commit54ba51dff21de666c5ae3bf3abd4f0634ebb0676 (patch)
tree58a69dccdbfd227b9de3c58a416de45d2a8d3513 /include/ui/GraphicBuffer.h
parent36bc94173c957f33f70bcd16c369951f5b2dc3f6 (diff)
downloadframeworks_native-54ba51dff21de666c5ae3bf3abd4f0634ebb0676.zip
frameworks_native-54ba51dff21de666c5ae3bf3abd4f0634ebb0676.tar.gz
frameworks_native-54ba51dff21de666c5ae3bf3abd4f0634ebb0676.tar.bz2
fix [2143798] Need to figure out how to do video
Use EGLImageKHR instead of copybit directly. We now have the basis to use streaming YUV textures (well, in fact we already are). When/if we use the GPU instead of the MDP we'll need to make sure it supports the appropriate YUV format. Also make sure we compile if EGL_ANDROID_image_native_buffer is not supported
Diffstat (limited to 'include/ui/GraphicBuffer.h')
-rw-r--r--include/ui/GraphicBuffer.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/ui/GraphicBuffer.h b/include/ui/GraphicBuffer.h
index 8897f03..2172536 100644
--- a/include/ui/GraphicBuffer.h
+++ b/include/ui/GraphicBuffer.h
@@ -66,7 +66,11 @@ public:
GraphicBuffer();
// creates w * h buffer
- GraphicBuffer(uint32_t w, uint32_t h, PixelFormat format, uint32_t ssage);
+ GraphicBuffer(uint32_t w, uint32_t h, PixelFormat format, uint32_t usage);
+
+ // create a buffer from an existing handle
+ GraphicBuffer(uint32_t w, uint32_t h, PixelFormat format, uint32_t usage,
+ uint32_t stride, native_handle_t* handle, bool keepOwnership);
// return status
status_t initCheck() const;
@@ -94,9 +98,15 @@ protected:
GraphicBuffer(const Parcel& reply);
virtual ~GraphicBuffer();
+ enum {
+ ownNone = 0,
+ ownHandle = 1,
+ ownData = 2,
+ };
+
inline const GraphicBufferMapper& getBufferMapper() const { return mBufferMapper; }
inline GraphicBufferMapper& getBufferMapper() { return mBufferMapper; }
- bool mOwner;
+ uint8_t mOwner;
private:
friend class Surface;