Loading libs/gui/SurfaceComposerClient.cpp +8 −7 Original line number Diff line number Diff line Loading @@ -89,6 +89,8 @@ int64_t generateId() { void emptyCallback(nsecs_t, const sp<Fence>&, const std::vector<SurfaceControlStats>&) {} } // namespace const std::string SurfaceComposerClient::kEmpty{}; ComposerService::ComposerService() : Singleton<ComposerService>() { Mutex::Autolock _l(mLock); Loading Loading @@ -1278,14 +1280,13 @@ status_t SurfaceComposerClient::Transaction::sendSurfaceFlushJankDataTransaction } // --------------------------------------------------------------------------- sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName, bool secure, float requestedRefereshRate) { sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName, bool isSecure, const std::string& uniqueId, float requestedRefreshRate) { sp<IBinder> display = nullptr; binder::Status status = ComposerServiceAIDL::getComposerService()->createDisplay(std::string( displayName.c_str()), secure, requestedRefereshRate, &display); binder::Status status = ComposerServiceAIDL::getComposerService() ->createDisplay(std::string(displayName.c_str()), isSecure, uniqueId, requestedRefreshRate, &display); return status.isOk() ? display : nullptr; } Loading libs/gui/aidl/android/gui/ISurfaceComposer.aidl +10 −8 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ interface ISurfaceComposer { void bootFinished(); /** * Create a display event connection * Create a display event connection. * * layerHandle * Optional binder handle representing a Layer in SF to associate the new Loading @@ -89,12 +89,14 @@ interface ISurfaceComposer { @nullable ISurfaceComposerClient createConnection(); /** * Create a virtual display * Create a virtual display. * * displayName * The name of the virtual display * secure * Whether this virtual display is secure * The name of the virtual display. * isSecure * Whether this virtual display is secure. * uniqueId * The unique ID for the display. * 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 Loading @@ -103,11 +105,11 @@ interface ISurfaceComposer { * * requires ACCESS_SURFACE_FLINGER permission. */ @nullable IBinder createDisplay(@utf8InCpp String displayName, boolean secure, float requestedRefreshRate); @nullable IBinder createDisplay(@utf8InCpp String displayName, boolean isSecure, @utf8InCpp String uniqueId, float requestedRefreshRate); /** * Destroy a virtual display * Destroy a virtual display. * requires ACCESS_SURFACE_FLINGER permission. */ void destroyDisplay(IBinder display); Loading libs/gui/include/gui/SurfaceComposerClient.h +5 −6 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <stdint.h> #include <sys/types.h> #include <set> #include <thread> #include <unordered_map> Loading Loading @@ -374,17 +375,15 @@ public: sp<SurfaceControl> mirrorDisplay(DisplayId displayId); //! Create a virtual display static sp<IBinder> createDisplay(const String8& displayName, bool secure, float requestedRefereshRate = 0); static const std::string kEmpty; static sp<IBinder> createDisplay(const String8& displayName, bool isSecure, const std::string& uniqueId = kEmpty, float requestedRefreshRate = 0); //! Destroy a virtual display static void destroyDisplay(const sp<IBinder>& display); //! Get stable IDs for connected physical displays static std::vector<PhysicalDisplayId> getPhysicalDisplayIds(); //! Get token for a physical display given its stable ID static sp<IBinder> getPhysicalDisplayToken(PhysicalDisplayId displayId); // Returns StalledTransactionInfo if a transaction from the provided pid has not been applied Loading libs/gui/tests/Surface_test.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -673,8 +673,8 @@ public: return binder::Status::ok(); } binder::Status createDisplay(const std::string& /*displayName*/, bool /*secure*/, float /*requestedRefreshRate*/, binder::Status createDisplay(const std::string& /*displayName*/, bool /*isSecure*/, const std::string& /*uniqueId*/, float /*requestedRefreshRate*/, sp<IBinder>* /*outDisplay*/) override { return binder::Status::ok(); } Loading services/surfaceflinger/DisplayDevice.h +1 −0 Original line number Diff line number Diff line Loading @@ -329,6 +329,7 @@ struct DisplayDeviceState { uint32_t width = 0; uint32_t height = 0; std::string displayName; std::string uniqueId; bool isSecure = false; bool isProtected = false; // Refer to DisplayDevice::mRequestedRefreshRate, for virtual display only Loading Loading
libs/gui/SurfaceComposerClient.cpp +8 −7 Original line number Diff line number Diff line Loading @@ -89,6 +89,8 @@ int64_t generateId() { void emptyCallback(nsecs_t, const sp<Fence>&, const std::vector<SurfaceControlStats>&) {} } // namespace const std::string SurfaceComposerClient::kEmpty{}; ComposerService::ComposerService() : Singleton<ComposerService>() { Mutex::Autolock _l(mLock); Loading Loading @@ -1278,14 +1280,13 @@ status_t SurfaceComposerClient::Transaction::sendSurfaceFlushJankDataTransaction } // --------------------------------------------------------------------------- sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName, bool secure, float requestedRefereshRate) { sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName, bool isSecure, const std::string& uniqueId, float requestedRefreshRate) { sp<IBinder> display = nullptr; binder::Status status = ComposerServiceAIDL::getComposerService()->createDisplay(std::string( displayName.c_str()), secure, requestedRefereshRate, &display); binder::Status status = ComposerServiceAIDL::getComposerService() ->createDisplay(std::string(displayName.c_str()), isSecure, uniqueId, requestedRefreshRate, &display); return status.isOk() ? display : nullptr; } Loading
libs/gui/aidl/android/gui/ISurfaceComposer.aidl +10 −8 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ interface ISurfaceComposer { void bootFinished(); /** * Create a display event connection * Create a display event connection. * * layerHandle * Optional binder handle representing a Layer in SF to associate the new Loading @@ -89,12 +89,14 @@ interface ISurfaceComposer { @nullable ISurfaceComposerClient createConnection(); /** * Create a virtual display * Create a virtual display. * * displayName * The name of the virtual display * secure * Whether this virtual display is secure * The name of the virtual display. * isSecure * Whether this virtual display is secure. * uniqueId * The unique ID for the display. * 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 Loading @@ -103,11 +105,11 @@ interface ISurfaceComposer { * * requires ACCESS_SURFACE_FLINGER permission. */ @nullable IBinder createDisplay(@utf8InCpp String displayName, boolean secure, float requestedRefreshRate); @nullable IBinder createDisplay(@utf8InCpp String displayName, boolean isSecure, @utf8InCpp String uniqueId, float requestedRefreshRate); /** * Destroy a virtual display * Destroy a virtual display. * requires ACCESS_SURFACE_FLINGER permission. */ void destroyDisplay(IBinder display); Loading
libs/gui/include/gui/SurfaceComposerClient.h +5 −6 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <stdint.h> #include <sys/types.h> #include <set> #include <thread> #include <unordered_map> Loading Loading @@ -374,17 +375,15 @@ public: sp<SurfaceControl> mirrorDisplay(DisplayId displayId); //! Create a virtual display static sp<IBinder> createDisplay(const String8& displayName, bool secure, float requestedRefereshRate = 0); static const std::string kEmpty; static sp<IBinder> createDisplay(const String8& displayName, bool isSecure, const std::string& uniqueId = kEmpty, float requestedRefreshRate = 0); //! Destroy a virtual display static void destroyDisplay(const sp<IBinder>& display); //! Get stable IDs for connected physical displays static std::vector<PhysicalDisplayId> getPhysicalDisplayIds(); //! Get token for a physical display given its stable ID static sp<IBinder> getPhysicalDisplayToken(PhysicalDisplayId displayId); // Returns StalledTransactionInfo if a transaction from the provided pid has not been applied Loading
libs/gui/tests/Surface_test.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -673,8 +673,8 @@ public: return binder::Status::ok(); } binder::Status createDisplay(const std::string& /*displayName*/, bool /*secure*/, float /*requestedRefreshRate*/, binder::Status createDisplay(const std::string& /*displayName*/, bool /*isSecure*/, const std::string& /*uniqueId*/, float /*requestedRefreshRate*/, sp<IBinder>* /*outDisplay*/) override { return binder::Status::ok(); } Loading
services/surfaceflinger/DisplayDevice.h +1 −0 Original line number Diff line number Diff line Loading @@ -329,6 +329,7 @@ struct DisplayDeviceState { uint32_t width = 0; uint32_t height = 0; std::string displayName; std::string uniqueId; bool isSecure = false; bool isProtected = false; // Refer to DisplayDevice::mRequestedRefreshRate, for virtual display only Loading