diff options
author | Chih-Chung Chang <chihchung@google.com> | 2010-01-21 17:31:06 -0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2010-01-21 20:20:08 -0800 |
commit | 52e7200b6e020bba978c36e3a928493a3f2c8a92 (patch) | |
tree | 9c752d7d277ba2dfb9789763369a7373888557a2 /libs/surfaceflinger/LayerBuffer.h | |
parent | d28d5be75b41fe48f486f9b83ae8685496983f5a (diff) | |
download | frameworks_native-52e7200b6e020bba978c36e3a928493a3f2c8a92.zip frameworks_native-52e7200b6e020bba978c36e3a928493a3f2c8a92.tar.gz frameworks_native-52e7200b6e020bba978c36e3a928493a3f2c8a92.tar.bz2 |
Add an orientation parameter for overlay, so we can do camera preview in portrait mode.
Diffstat (limited to 'libs/surfaceflinger/LayerBuffer.h')
-rw-r--r-- | libs/surfaceflinger/LayerBuffer.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/surfaceflinger/LayerBuffer.h b/libs/surfaceflinger/LayerBuffer.h index 1b31435..e03f92c 100644 --- a/libs/surfaceflinger/LayerBuffer.h +++ b/libs/surfaceflinger/LayerBuffer.h @@ -74,7 +74,8 @@ public: status_t registerBuffers(const ISurface::BufferHeap& buffers); void postBuffer(ssize_t offset); void unregisterBuffers(); - sp<OverlayRef> createOverlay(uint32_t w, uint32_t h, int32_t format); + sp<OverlayRef> createOverlay(uint32_t w, uint32_t h, int32_t format, + int32_t orientation); sp<Source> getSource() const; sp<Source> clearSource(); @@ -150,7 +151,7 @@ private: public: OverlaySource(LayerBuffer& layer, sp<OverlayRef>* overlayRef, - uint32_t w, uint32_t h, int32_t format); + uint32_t w, uint32_t h, int32_t format, int32_t orientation); virtual ~OverlaySource(); virtual void onDraw(const Region& clip) const; virtual void onTransaction(uint32_t flags); @@ -183,6 +184,7 @@ private: int32_t mFormat; int32_t mWidthStride; int32_t mHeightStride; + int32_t mOrientation; mutable Mutex mOverlaySourceLock; bool mInitialized; }; @@ -200,7 +202,7 @@ private: virtual void unregisterBuffers(); virtual sp<OverlayRef> createOverlay( - uint32_t w, uint32_t h, int32_t format); + uint32_t w, uint32_t h, int32_t format, int32_t orientation); private: sp<LayerBuffer> getOwner() const { return static_cast<LayerBuffer*>(Surface::getOwner().get()); |