Loading libs/gui/SurfaceComposerClient.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -1182,12 +1182,14 @@ void SurfaceComposerClient::Transaction::setDefaultApplyToken(sp<IBinder> applyT } // --------------------------------------------------------------------------- sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName, bool secure) { sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName, bool secure, float requestedRefereshRate) { sp<IBinder> display = nullptr; binder::Status status = ComposerServiceAIDL::getComposerService()->createDisplay(std::string( displayName.string()), secure, &display); secure, requestedRefereshRate, &display); return status.isOk() ? display : nullptr; } Loading libs/gui/aidl/android/gui/ISurfaceComposer.aidl +13 −1 Original line number Diff line number Diff line Loading @@ -79,9 +79,21 @@ interface ISurfaceComposer { /** * Create a virtual display * * displayName * The name of the virtual display * secure * Whether this virtual display is secure * requestedRefreshRate * The refresh rate, frames per second, to request on the virtual display. * This is just a request, the actual rate may be adjusted to align well * with physical displays running concurrently. If 0 is specified, the * virtual display is refreshed at the physical display refresh rate. * * requires ACCESS_SURFACE_FLINGER permission. */ @nullable IBinder createDisplay(@utf8InCpp String displayName, boolean secure); @nullable IBinder createDisplay(@utf8InCpp String displayName, boolean secure, float requestedRefreshRate); /** * Destroy a virtual display Loading libs/gui/fuzzer/libgui_fuzzer_utils.h +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ public: sp<gui::IDisplayEventConnection>*), (override)); MOCK_METHOD(binder::Status, createConnection, (sp<gui::ISurfaceComposerClient>*), (override)); MOCK_METHOD(binder::Status, createDisplay, (const std::string&, bool, sp<IBinder>*), MOCK_METHOD(binder::Status, createDisplay, (const std::string&, bool, float, sp<IBinder>*), (override)); MOCK_METHOD(binder::Status, destroyDisplay, (const sp<IBinder>&), (override)); MOCK_METHOD(binder::Status, getPhysicalDisplayIds, (std::vector<int64_t>*), (override)); Loading libs/gui/include/gui/SurfaceComposerClient.h +2 −1 Original line number Diff line number Diff line Loading @@ -355,7 +355,8 @@ public: sp<SurfaceControl> mirrorDisplay(DisplayId displayId); //! Create a virtual display static sp<IBinder> createDisplay(const String8& displayName, bool secure); static sp<IBinder> createDisplay(const String8& displayName, bool secure, float requestedRefereshRate = 0); //! Destroy a virtual display static void destroyDisplay(const sp<IBinder>& display); Loading libs/gui/tests/Surface_test.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -736,6 +736,7 @@ public: } binder::Status createDisplay(const std::string& /*displayName*/, bool /*secure*/, float /*requestedRefreshRate*/, sp<IBinder>* /*outDisplay*/) override { return binder::Status::ok(); } Loading Loading
libs/gui/SurfaceComposerClient.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -1182,12 +1182,14 @@ void SurfaceComposerClient::Transaction::setDefaultApplyToken(sp<IBinder> applyT } // --------------------------------------------------------------------------- sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName, bool secure) { sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName, bool secure, float requestedRefereshRate) { sp<IBinder> display = nullptr; binder::Status status = ComposerServiceAIDL::getComposerService()->createDisplay(std::string( displayName.string()), secure, &display); secure, requestedRefereshRate, &display); return status.isOk() ? display : nullptr; } Loading
libs/gui/aidl/android/gui/ISurfaceComposer.aidl +13 −1 Original line number Diff line number Diff line Loading @@ -79,9 +79,21 @@ interface ISurfaceComposer { /** * Create a virtual display * * displayName * The name of the virtual display * secure * Whether this virtual display is secure * requestedRefreshRate * The refresh rate, frames per second, to request on the virtual display. * This is just a request, the actual rate may be adjusted to align well * with physical displays running concurrently. If 0 is specified, the * virtual display is refreshed at the physical display refresh rate. * * requires ACCESS_SURFACE_FLINGER permission. */ @nullable IBinder createDisplay(@utf8InCpp String displayName, boolean secure); @nullable IBinder createDisplay(@utf8InCpp String displayName, boolean secure, float requestedRefreshRate); /** * Destroy a virtual display Loading
libs/gui/fuzzer/libgui_fuzzer_utils.h +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ public: sp<gui::IDisplayEventConnection>*), (override)); MOCK_METHOD(binder::Status, createConnection, (sp<gui::ISurfaceComposerClient>*), (override)); MOCK_METHOD(binder::Status, createDisplay, (const std::string&, bool, sp<IBinder>*), MOCK_METHOD(binder::Status, createDisplay, (const std::string&, bool, float, sp<IBinder>*), (override)); MOCK_METHOD(binder::Status, destroyDisplay, (const sp<IBinder>&), (override)); MOCK_METHOD(binder::Status, getPhysicalDisplayIds, (std::vector<int64_t>*), (override)); Loading
libs/gui/include/gui/SurfaceComposerClient.h +2 −1 Original line number Diff line number Diff line Loading @@ -355,7 +355,8 @@ public: sp<SurfaceControl> mirrorDisplay(DisplayId displayId); //! Create a virtual display static sp<IBinder> createDisplay(const String8& displayName, bool secure); static sp<IBinder> createDisplay(const String8& displayName, bool secure, float requestedRefereshRate = 0); //! Destroy a virtual display static void destroyDisplay(const sp<IBinder>& display); Loading
libs/gui/tests/Surface_test.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -736,6 +736,7 @@ public: } binder::Status createDisplay(const std::string& /*displayName*/, bool /*secure*/, float /*requestedRefreshRate*/, sp<IBinder>* /*outDisplay*/) override { return binder::Status::ok(); } Loading