diff options
Diffstat (limited to 'include/ui/ISurface.h')
-rw-r--r-- | include/ui/ISurface.h | 49 |
1 files changed, 47 insertions, 2 deletions
diff --git a/include/ui/ISurface.h b/include/ui/ISurface.h index 9a7383c..1c8043d 100644 --- a/include/ui/ISurface.h +++ b/include/ui/ISurface.h @@ -34,11 +34,56 @@ class OverlayRef; class ISurface : public IInterface { +protected: + enum { + REGISTER_BUFFERS = IBinder::FIRST_CALL_TRANSACTION, + UNREGISTER_BUFFERS, + POST_BUFFER, // one-way transaction + CREATE_OVERLAY, + }; + public: DECLARE_META_INTERFACE(Surface); - virtual status_t registerBuffers(int w, int h, int hstride, int vstride, - PixelFormat format, const sp<IMemoryHeap>& heap) = 0; + + class BufferHeap { + public: + enum { + /* flip source image horizontally */ + FLIP_H = 0x01, + /* flip source image vertically */ + FLIP_V = 0x02, + /* rotate source image 90 degrees */ + ROT_90 = 0x04, + /* rotate source image 180 degrees */ + ROT_180 = 0x03, + /* rotate source image 270 degrees */ + ROT_270 = 0x07, + }; + BufferHeap(); + + BufferHeap(uint32_t w, uint32_t h, + int32_t hor_stride, int32_t ver_stride, + PixelFormat format, const sp<IMemoryHeap>& heap); + + BufferHeap(uint32_t w, uint32_t h, + int32_t hor_stride, int32_t ver_stride, + PixelFormat format, uint32_t transform, uint32_t flags, + const sp<IMemoryHeap>& heap); + + ~BufferHeap(); + + uint32_t w; + uint32_t h; + int32_t hor_stride; + int32_t ver_stride; + PixelFormat format; + uint32_t transform; + uint32_t flags; + sp<IMemoryHeap> heap; + }; + + virtual status_t registerBuffers(const BufferHeap& buffers) = 0; virtual void postBuffer(ssize_t offset) = 0; // one-way |