Loading libs/gui/SurfaceComposerClient.cpp +12 −8 Original line number Diff line number Diff line Loading @@ -1280,18 +1280,22 @@ status_t SurfaceComposerClient::Transaction::sendSurfaceFlushJankDataTransaction } // --------------------------------------------------------------------------- sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName, bool isSecure, const std::string& uniqueId, sp<IBinder> SurfaceComposerClient::createVirtualDisplay(const std::string& displayName, bool isSecure, const std::string& uniqueId, float requestedRefreshRate) { sp<IBinder> display = nullptr; binder::Status status = ComposerServiceAIDL::getComposerService() ->createDisplay(std::string(displayName.c_str()), isSecure, uniqueId, requestedRefreshRate, &display); binder::Status status = ComposerServiceAIDL::getComposerService()->createVirtualDisplay(displayName, isSecure, uniqueId, requestedRefreshRate, &display); return status.isOk() ? display : nullptr; } void SurfaceComposerClient::destroyDisplay(const sp<IBinder>& display) { ComposerServiceAIDL::getComposerService()->destroyDisplay(display); status_t SurfaceComposerClient::destroyVirtualDisplay(const sp<IBinder>& displayToken) { return ComposerServiceAIDL::getComposerService() ->destroyVirtualDisplay(displayToken) .transactionError(); } std::vector<PhysicalDisplayId> SurfaceComposerClient::getPhysicalDisplayIds() { Loading libs/gui/aidl/android/gui/ISurfaceComposer.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -105,14 +105,14 @@ interface ISurfaceComposer { * * requires ACCESS_SURFACE_FLINGER permission. */ @nullable IBinder createDisplay(@utf8InCpp String displayName, boolean isSecure, @nullable IBinder createVirtualDisplay(@utf8InCpp String displayName, boolean isSecure, @utf8InCpp String uniqueId, float requestedRefreshRate); /** * Destroy a virtual display. * requires ACCESS_SURFACE_FLINGER permission. */ void destroyDisplay(IBinder display); void destroyVirtualDisplay(IBinder displayToken); /** * Get stable IDs for connected physical displays. Loading libs/gui/include/gui/ISurfaceComposer.h +2 −2 Original line number Diff line number Diff line Loading @@ -130,8 +130,8 @@ public: CREATE_CONNECTION, // Deprecated. Autogenerated by .aidl now. GET_STATIC_DISPLAY_INFO, // Deprecated. Autogenerated by .aidl now. CREATE_DISPLAY_EVENT_CONNECTION, // Deprecated. Autogenerated by .aidl now. CREATE_DISPLAY, // Deprecated. Autogenerated by .aidl now. DESTROY_DISPLAY, // Deprecated. Autogenerated by .aidl now. CREATE_VIRTUAL_DISPLAY, // Deprecated. Autogenerated by .aidl now. DESTROY_VIRTUAL_DISPLAY, // Deprecated. Autogenerated by .aidl now. GET_PHYSICAL_DISPLAY_TOKEN, // Deprecated. Autogenerated by .aidl now. SET_TRANSACTION_STATE, AUTHENTICATE_SURFACE, // Deprecated. Autogenerated by .aidl now. Loading libs/gui/include/gui/SurfaceComposerClient.h +4 −4 Original line number Diff line number Diff line Loading @@ -376,11 +376,11 @@ public: sp<SurfaceControl> mirrorDisplay(DisplayId displayId); static const std::string kEmpty; static sp<IBinder> createDisplay(const String8& displayName, bool isSecure, static sp<IBinder> createVirtualDisplay(const std::string& displayName, bool isSecure, const std::string& uniqueId = kEmpty, float requestedRefreshRate = 0); static void destroyDisplay(const sp<IBinder>& display); static status_t destroyVirtualDisplay(const sp<IBinder>& displayToken); static std::vector<PhysicalDisplayId> getPhysicalDisplayIds(); Loading libs/gui/tests/EndToEndNativeInputTest.cpp +3 −4 Original line number Diff line number Diff line Loading @@ -1184,9 +1184,8 @@ public: MultiDisplayTests() : InputSurfacesTest() { ProcessState::self()->startThreadPool(); } void TearDown() override { for (auto& token : mVirtualDisplays) { SurfaceComposerClient::destroyDisplay(token); } std::for_each(mVirtualDisplays.begin(), mVirtualDisplays.end(), SurfaceComposerClient::destroyVirtualDisplay); InputSurfacesTest::TearDown(); } Loading @@ -1201,7 +1200,7 @@ public: std::string name = "VirtualDisplay"; name += std::to_string(mVirtualDisplays.size()); sp<IBinder> token = SurfaceComposerClient::createDisplay(String8(name.c_str()), isSecure); sp<IBinder> token = SurfaceComposerClient::createVirtualDisplay(name, isSecure); SurfaceComposerClient::Transaction t; t.setDisplaySurface(token, producer); t.setDisplayFlags(token, receivesInput ? 0x01 /* DisplayDevice::eReceivesInput */ : 0); Loading Loading
libs/gui/SurfaceComposerClient.cpp +12 −8 Original line number Diff line number Diff line Loading @@ -1280,18 +1280,22 @@ status_t SurfaceComposerClient::Transaction::sendSurfaceFlushJankDataTransaction } // --------------------------------------------------------------------------- sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName, bool isSecure, const std::string& uniqueId, sp<IBinder> SurfaceComposerClient::createVirtualDisplay(const std::string& displayName, bool isSecure, const std::string& uniqueId, float requestedRefreshRate) { sp<IBinder> display = nullptr; binder::Status status = ComposerServiceAIDL::getComposerService() ->createDisplay(std::string(displayName.c_str()), isSecure, uniqueId, requestedRefreshRate, &display); binder::Status status = ComposerServiceAIDL::getComposerService()->createVirtualDisplay(displayName, isSecure, uniqueId, requestedRefreshRate, &display); return status.isOk() ? display : nullptr; } void SurfaceComposerClient::destroyDisplay(const sp<IBinder>& display) { ComposerServiceAIDL::getComposerService()->destroyDisplay(display); status_t SurfaceComposerClient::destroyVirtualDisplay(const sp<IBinder>& displayToken) { return ComposerServiceAIDL::getComposerService() ->destroyVirtualDisplay(displayToken) .transactionError(); } std::vector<PhysicalDisplayId> SurfaceComposerClient::getPhysicalDisplayIds() { Loading
libs/gui/aidl/android/gui/ISurfaceComposer.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -105,14 +105,14 @@ interface ISurfaceComposer { * * requires ACCESS_SURFACE_FLINGER permission. */ @nullable IBinder createDisplay(@utf8InCpp String displayName, boolean isSecure, @nullable IBinder createVirtualDisplay(@utf8InCpp String displayName, boolean isSecure, @utf8InCpp String uniqueId, float requestedRefreshRate); /** * Destroy a virtual display. * requires ACCESS_SURFACE_FLINGER permission. */ void destroyDisplay(IBinder display); void destroyVirtualDisplay(IBinder displayToken); /** * Get stable IDs for connected physical displays. Loading
libs/gui/include/gui/ISurfaceComposer.h +2 −2 Original line number Diff line number Diff line Loading @@ -130,8 +130,8 @@ public: CREATE_CONNECTION, // Deprecated. Autogenerated by .aidl now. GET_STATIC_DISPLAY_INFO, // Deprecated. Autogenerated by .aidl now. CREATE_DISPLAY_EVENT_CONNECTION, // Deprecated. Autogenerated by .aidl now. CREATE_DISPLAY, // Deprecated. Autogenerated by .aidl now. DESTROY_DISPLAY, // Deprecated. Autogenerated by .aidl now. CREATE_VIRTUAL_DISPLAY, // Deprecated. Autogenerated by .aidl now. DESTROY_VIRTUAL_DISPLAY, // Deprecated. Autogenerated by .aidl now. GET_PHYSICAL_DISPLAY_TOKEN, // Deprecated. Autogenerated by .aidl now. SET_TRANSACTION_STATE, AUTHENTICATE_SURFACE, // Deprecated. Autogenerated by .aidl now. Loading
libs/gui/include/gui/SurfaceComposerClient.h +4 −4 Original line number Diff line number Diff line Loading @@ -376,11 +376,11 @@ public: sp<SurfaceControl> mirrorDisplay(DisplayId displayId); static const std::string kEmpty; static sp<IBinder> createDisplay(const String8& displayName, bool isSecure, static sp<IBinder> createVirtualDisplay(const std::string& displayName, bool isSecure, const std::string& uniqueId = kEmpty, float requestedRefreshRate = 0); static void destroyDisplay(const sp<IBinder>& display); static status_t destroyVirtualDisplay(const sp<IBinder>& displayToken); static std::vector<PhysicalDisplayId> getPhysicalDisplayIds(); Loading
libs/gui/tests/EndToEndNativeInputTest.cpp +3 −4 Original line number Diff line number Diff line Loading @@ -1184,9 +1184,8 @@ public: MultiDisplayTests() : InputSurfacesTest() { ProcessState::self()->startThreadPool(); } void TearDown() override { for (auto& token : mVirtualDisplays) { SurfaceComposerClient::destroyDisplay(token); } std::for_each(mVirtualDisplays.begin(), mVirtualDisplays.end(), SurfaceComposerClient::destroyVirtualDisplay); InputSurfacesTest::TearDown(); } Loading @@ -1201,7 +1200,7 @@ public: std::string name = "VirtualDisplay"; name += std::to_string(mVirtualDisplays.size()); sp<IBinder> token = SurfaceComposerClient::createDisplay(String8(name.c_str()), isSecure); sp<IBinder> token = SurfaceComposerClient::createVirtualDisplay(name, isSecure); SurfaceComposerClient::Transaction t; t.setDisplaySurface(token, producer); t.setDisplayFlags(token, receivesInput ? 0x01 /* DisplayDevice::eReceivesInput */ : 0); Loading