From 8b33f032327f8de0dcc0e6d0d43ed80f834b51f6 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 24 Jul 2012 20:43:54 -0700 Subject: update SF binder protocol to support setting display attributes no change of functionality -- the old behavior is implemented on top of this new protocol. this new protocol will allow, eventually, to pass informations about displays and layer stacks. Change-Id: Ic6c2295e61ec8ecbc8ce01ab7664e35d928202fc --- libs/gui/ISurfaceComposer.cpp | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) (limited to 'libs/gui/ISurfaceComposer.cpp') diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp index bc550bf105..60341ff263 100644 --- a/libs/gui/ISurfaceComposer.cpp +++ b/libs/gui/ISurfaceComposer.cpp @@ -76,18 +76,29 @@ public: return interface_cast(reply.readStrongBinder()); } - virtual void setTransactionState(const Vector& state, - int orientation, uint32_t flags) + virtual void setTransactionState( + const Vector& state, + const Vector& displays, + uint32_t flags) { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); - Vector::const_iterator b(state.begin()); - Vector::const_iterator e(state.end()); - data.writeInt32(state.size()); - for ( ; b != e ; ++b ) { - b->write(data); + { + Vector::const_iterator b(state.begin()); + Vector::const_iterator e(state.end()); + data.writeInt32(state.size()); + for ( ; b != e ; ++b ) { + b->write(data); + } + } + { + Vector::const_iterator b(displays.begin()); + Vector::const_iterator e(displays.end()); + data.writeInt32(displays.size()); + for ( ; b != e ; ++b ) { + b->write(data); + } } - data.writeInt32(orientation); data.writeInt32(flags); remote()->transact(BnSurfaceComposer::SET_TRANSACTION_STATE, data, &reply); } @@ -244,9 +255,16 @@ status_t BnSurfaceComposer::onTransact( s.read(data); state.add(s); } - int orientation = data.readInt32(); + count = data.readInt32(); + DisplayState d; + Vector displays; + displays.setCapacity(count); + for (size_t i=0 ; i