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 | e1ceec234c618729cc7bd35fecb11744b52c1cc8 (patch) | |
tree | d478c2160bfb90b429f13089a92d182ddf0b62e0 /libs/surfaceflinger/LayerBuffer.h | |
parent | 177b580f56e91bc5519b8772e696b14f8b5757e2 (diff) | |
download | frameworks_base-e1ceec234c618729cc7bd35fecb11744b52c1cc8.zip frameworks_base-e1ceec234c618729cc7bd35fecb11744b52c1cc8.tar.gz frameworks_base-e1ceec234c618729cc7bd35fecb11744b52c1cc8.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()); |