diff options
| author | Jamie Gennis <jgennis@google.com> | 2010-10-07 13:46:55 -0700 |
|---|---|---|
| committer | Jamie Gennis <jgennis@google.com> | 2010-10-10 13:09:46 -0700 |
| commit | 1ef773ff9caf9c1b9ee32b634f1c80e9a065aa6a (patch) | |
| tree | 9f00c524f8d91b21fe99ce89c3a1d703fb236b1d /include | |
| parent | d6e9d7695b55414420c366528ba431eacdea5dfc (diff) | |
| download | frameworks_base-1ef773ff9caf9c1b9ee32b634f1c80e9a065aa6a.zip frameworks_base-1ef773ff9caf9c1b9ee32b634f1c80e9a065aa6a.tar.gz frameworks_base-1ef773ff9caf9c1b9ee32b634f1c80e9a065aa6a.tar.bz2 | |
Move binder magic from the Surface class to GraphicBuffer.
- Register buffers with Gralloc when unflattening a GraphicBuffer (rather than
doing it in the Surface class).
- Add support for a GraphicBuffer that wraps an android_native_window_t*.
Change-Id: I029ac086111bbac800e5ca37eb505f558b718cd8
Diffstat (limited to 'include')
| -rw-r--r-- | include/ui/GraphicBuffer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/ui/GraphicBuffer.h b/include/ui/GraphicBuffer.h index a3e85a9..c446633 100644 --- a/include/ui/GraphicBuffer.h +++ b/include/ui/GraphicBuffer.h @@ -72,6 +72,9 @@ public: GraphicBuffer(uint32_t w, uint32_t h, PixelFormat format, uint32_t usage, uint32_t stride, native_handle_t* handle, bool keepOwnership); + // create a buffer from an existing android_native_buffer_t + GraphicBuffer(android_native_buffer_t* buffer, bool keepOwnership); + // return status status_t initCheck() const; @@ -137,6 +140,10 @@ private: GraphicBufferMapper& mBufferMapper; ssize_t mInitCheck; int mIndex; + + // If we're wrapping another buffer then this reference will make sure it + // doesn't get freed. + sp<android_native_buffer_t> mWrappedBuffer; }; }; // namespace android |
