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/ui | |
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/ui')
-rw-r--r-- | libs/ui/ISurface.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/ui/ISurface.cpp b/libs/ui/ISurface.cpp index 4fb38ed..6f3d762 100644 --- a/libs/ui/ISurface.cpp +++ b/libs/ui/ISurface.cpp @@ -115,13 +115,14 @@ public: } 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) { Parcel data, reply; data.writeInterfaceToken(ISurface::getInterfaceDescriptor()); data.writeInt32(w); data.writeInt32(h); data.writeInt32(format); + data.writeInt32(orientation); remote()->transact(CREATE_OVERLAY, data, &reply); return OverlayRef::readFromParcel(reply); } @@ -173,7 +174,8 @@ status_t BnSurface::onTransact( int w = data.readInt32(); int h = data.readInt32(); int f = data.readInt32(); - sp<OverlayRef> o = createOverlay(w, h, f); + int orientation = data.readInt32(); + sp<OverlayRef> o = createOverlay(w, h, f, orientation); return OverlayRef::writeToParcel(reply, o); } break; default: |