diff options
author | 2022-02-15 10:43:00 -0800 | |
---|---|---|
committer | 2022-02-25 12:58:15 -0800 | |
commit | aa7fc2e4495398a717a4fe0ffbfd783e3a887cec (patch) | |
tree | 91988197850951b036f65b41cc06eca8f695e8cd /libs/gui/ISurfaceComposer.cpp | |
parent | 37396db2bf50b039a6942c9fd692ff899bd531de (diff) |
Migrate display related methods to AIDL part 3
This migrates more display related methods from ISurfaceComposer.h to the new AIDL interface.
(1) migrate getDisplaySttas() and getDisplayState() methods
(2) add new parcelables, android.gui.DisplayState, anddroid.gui.DisplayStatInfo and other utilities.
(3) all parceables are added into libgui, instead of libui, so libui is isolated from binder serialization code,which is cleaner and avoids libbinder linking errors.
Bug: 220043617
Bug: 219574942
Test: atest SurfaceFlinger_test libsurfaceflinger_unittest libgui_test
Change-Id: Iacdc42dde1608f883c5578aa3d9f9f8ae9f23038
Diffstat (limited to 'libs/gui/ISurfaceComposer.cpp')
-rw-r--r-- | libs/gui/ISurfaceComposer.cpp | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp index d7ec9ff1d6..3c02e21aff 100644 --- a/libs/gui/ISurfaceComposer.cpp +++ b/libs/gui/ISurfaceComposer.cpp @@ -220,18 +220,6 @@ public: return result; } - status_t getDisplayState(const sp<IBinder>& display, ui::DisplayState* state) override { - Parcel data, reply; - data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); - data.writeStrongBinder(display); - remote()->transact(BnSurfaceComposer::GET_DISPLAY_STATE, data, &reply); - const status_t result = reply.readInt32(); - if (result == NO_ERROR) { - memcpy(state, reply.readInplace(sizeof(ui::DisplayState)), sizeof(ui::DisplayState)); - } - return result; - } - status_t getStaticDisplayInfo(const sp<IBinder>& display, ui::StaticDisplayInfo* info) override { Parcel data, reply; @@ -254,20 +242,6 @@ public: return reply.read(*info); } - status_t getDisplayStats(const sp<IBinder>& display, DisplayStatInfo* stats) override { - Parcel data, reply; - data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); - data.writeStrongBinder(display); - remote()->transact(BnSurfaceComposer::GET_DISPLAY_STATS, data, &reply); - status_t result = reply.readInt32(); - if (result == NO_ERROR) { - memcpy(stats, - reply.readInplace(sizeof(DisplayStatInfo)), - sizeof(DisplayStatInfo)); - } - return result; - } - status_t getDisplayNativePrimaries(const sp<IBinder>& display, ui::DisplayPrimaries& primaries) override { Parcel data, reply; @@ -1165,18 +1139,6 @@ status_t BnSurfaceComposer::onTransact( reply->writeStrongBinder(IInterface::asBinder(connection)); return NO_ERROR; } - case GET_DISPLAY_STATE: { - CHECK_INTERFACE(ISurfaceComposer, data, reply); - ui::DisplayState state; - const sp<IBinder> display = data.readStrongBinder(); - const status_t result = getDisplayState(display, &state); - reply->writeInt32(result); - if (result == NO_ERROR) { - memcpy(reply->writeInplace(sizeof(ui::DisplayState)), &state, - sizeof(ui::DisplayState)); - } - return NO_ERROR; - } case GET_STATIC_DISPLAY_INFO: { CHECK_INTERFACE(ISurfaceComposer, data, reply); ui::StaticDisplayInfo info; @@ -1197,18 +1159,6 @@ status_t BnSurfaceComposer::onTransact( SAFE_PARCEL(reply->write, info); return NO_ERROR; } - case GET_DISPLAY_STATS: { - CHECK_INTERFACE(ISurfaceComposer, data, reply); - DisplayStatInfo stats; - sp<IBinder> display = data.readStrongBinder(); - status_t result = getDisplayStats(display, &stats); - reply->writeInt32(result); - if (result == NO_ERROR) { - memcpy(reply->writeInplace(sizeof(DisplayStatInfo)), - &stats, sizeof(DisplayStatInfo)); - } - return NO_ERROR; - } case GET_DISPLAY_NATIVE_PRIMARIES: { CHECK_INTERFACE(ISurfaceComposer, data, reply); ui::DisplayPrimaries primaries; |