diff options
| author | 2012-08-09 16:29:12 -0700 | |
|---|---|---|
| committer | 2012-08-10 17:32:33 -0700 | |
| commit | e57f292595bec48f65c8088b00ff6beea01217e9 (patch) | |
| tree | 2db8aac9c9056e099ad70d7ce70eb0ac7a8223ae /libs/gui/ISurfaceComposer.cpp | |
| parent | ef7b9c7eac036cc1230c64821039d18f8cbd2c1c (diff) | |
make multi-display more real
- displays are represented by a binder on the client side
- c++ clients can now create and modify displays
Change-Id: I203ea5b4beae0819d742ec5171c27568f4e8354b
Diffstat (limited to 'libs/gui/ISurfaceComposer.cpp')
| -rw-r--r-- | libs/gui/ISurfaceComposer.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp index 5d8f1a1095..76b23f33af 100644 --- a/libs/gui/ISurfaceComposer.cpp +++ b/libs/gui/ISurfaceComposer.cpp @@ -179,6 +179,23 @@ public: return result; } + virtual sp<IBinder> createDisplay() + { + Parcel data, reply; + data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); + remote()->transact(BnSurfaceComposer::CREATE_DISPLAY, data, &reply); + return reply.readStrongBinder(); + } + + virtual sp<IBinder> getBuiltInDisplay(int32_t id) + { + Parcel data, reply; + data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); + data.writeInt32(id); + remote()->transact(BnSurfaceComposer::GET_BUILT_IN_DISPLAY, data, &reply); + return reply.readStrongBinder(); + } + virtual void blank() { Parcel data, reply; @@ -286,6 +303,19 @@ status_t BnSurfaceComposer::onTransact( reply->writeStrongBinder(connection->asBinder()); return NO_ERROR; } break; + case CREATE_DISPLAY: { + CHECK_INTERFACE(ISurfaceComposer, data, reply); + sp<IBinder> display(createDisplay()); + reply->writeStrongBinder(display); + return NO_ERROR; + } break; + case GET_BUILT_IN_DISPLAY: { + CHECK_INTERFACE(ISurfaceComposer, data, reply); + int32_t id = data.readInt32(); + sp<IBinder> display(getBuiltInDisplay(id)); + reply->writeStrongBinder(display); + return NO_ERROR; + } break; case BLANK: { CHECK_INTERFACE(ISurfaceComposer, data, reply); blank(); |