diff options
| author | 2011-10-12 13:04:36 -0700 | |
|---|---|---|
| committer | 2011-10-12 13:04:36 -0700 | |
| commit | c2091130ae1a1b37956f49d0fe81fb82413cd2dd (patch) | |
| tree | 66f938b4ed5ccbf59259c7d97853226399d273a7 /libs/gui/ISurfaceComposer.cpp | |
| parent | 485bc5543880ec7691ff935089a749037d2ecd14 (diff) | |
| parent | 075e4c3d2e6a8a9eb3506dfedc8da938fb65fb65 (diff) | |
am 075e4c3d: Merge "SurfaceFlinger: update orientation via transactions" into ics-mr0
* commit '075e4c3d2e6a8a9eb3506dfedc8da938fb65fb65':
SurfaceFlinger: update orientation via transactions
Diffstat (limited to 'libs/gui/ISurfaceComposer.cpp')
| -rw-r--r-- | libs/gui/ISurfaceComposer.cpp | 55 |
1 files changed, 4 insertions, 51 deletions
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp index 030a83e9675e..eb90147ac593 100644 --- a/libs/gui/ISurfaceComposer.cpp +++ b/libs/gui/ISurfaceComposer.cpp @@ -78,7 +78,8 @@ public: return interface_cast<IMemoryHeap>(reply.readStrongBinder()); } - virtual void setTransactionState(const Vector<ComposerState>& state) + virtual void setTransactionState(const Vector<ComposerState>& state, + int orientation) { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); @@ -88,38 +89,8 @@ public: for ( ; b != e ; ++b ) { b->write(data); } - remote()->transact(BnSurfaceComposer::SET_TRANSACTION_STATE, data, &reply); - } - - virtual status_t freezeDisplay(DisplayID dpy, uint32_t flags) - { - Parcel data, reply; - data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); - data.writeInt32(dpy); - data.writeInt32(flags); - remote()->transact(BnSurfaceComposer::FREEZE_DISPLAY, data, &reply); - return reply.readInt32(); - } - - virtual status_t unfreezeDisplay(DisplayID dpy, uint32_t flags) - { - Parcel data, reply; - data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); - data.writeInt32(dpy); - data.writeInt32(flags); - remote()->transact(BnSurfaceComposer::UNFREEZE_DISPLAY, data, &reply); - return reply.readInt32(); - } - - virtual int setOrientation(DisplayID dpy, int orientation, uint32_t flags) - { - Parcel data, reply; - data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); - data.writeInt32(dpy); data.writeInt32(orientation); - data.writeInt32(flags); - remote()->transact(BnSurfaceComposer::SET_ORIENTATION, data, &reply); - return reply.readInt32(); + remote()->transact(BnSurfaceComposer::SET_TRANSACTION_STATE, data, &reply); } virtual void bootFinished() @@ -232,26 +203,8 @@ status_t BnSurfaceComposer::onTransact( s.read(data); state.add(s); } - setTransactionState(state); - } break; - case SET_ORIENTATION: { - CHECK_INTERFACE(ISurfaceComposer, data, reply); - DisplayID dpy = data.readInt32(); int orientation = data.readInt32(); - uint32_t flags = data.readInt32(); - reply->writeInt32( setOrientation(dpy, orientation, flags) ); - } break; - case FREEZE_DISPLAY: { - CHECK_INTERFACE(ISurfaceComposer, data, reply); - DisplayID dpy = data.readInt32(); - uint32_t flags = data.readInt32(); - reply->writeInt32( freezeDisplay(dpy, flags) ); - } break; - case UNFREEZE_DISPLAY: { - CHECK_INTERFACE(ISurfaceComposer, data, reply); - DisplayID dpy = data.readInt32(); - uint32_t flags = data.readInt32(); - reply->writeInt32( unfreezeDisplay(dpy, flags) ); + setTransactionState(state, orientation); } break; case BOOT_FINISHED: { CHECK_INTERFACE(ISurfaceComposer, data, reply); |