summaryrefslogtreecommitdiffstats
path: root/include
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
commit9042b4564de5477b18e680c7dce13b587a681dd9 (patch)
tree04872061371527ef76dbfff6ee0d6c8fdadb99bc /include
parent678cdbe55e0de71436f8aad5f139eafc2ab6f937 (diff)
downloadframeworks_base-9042b4564de5477b18e680c7dce13b587a681dd9.zip
frameworks_base-9042b4564de5477b18e680c7dce13b587a681dd9.tar.gz
frameworks_base-9042b4564de5477b18e680c7dce13b587a681dd9.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')
-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;