Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25aae731 authored by Huihong Luo's avatar Huihong Luo
Browse files

Remove internal display related methods

Sync with changes made in SurfaceFlinger and SurfaceComposerClient.
Use the first display from the display list returned from SurfaceComposerClient.

Bug: 241285477
Test: run libhwui test
Change-Id: I0c76d66338bb3f6d69dc3d829d438ffd2a4462a6
parent 82839ebc
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -28,7 +28,10 @@ const ui::StaticDisplayInfo& getDisplayInfo() {
#if HWUI_NULL_GPU
        info.density = 2.f;
#else
        const sp<IBinder> token = SurfaceComposerClient::getInternalDisplayToken();
        const std::vector<PhysicalDisplayId> ids = SurfaceComposerClient::getPhysicalDisplayIds();
        LOG_ALWAYS_FATAL_IF(ids.empty(), "%s: No displays", __FUNCTION__);

        const sp<IBinder> token = SurfaceComposerClient::getPhysicalDisplayToken(ids.front());
        LOG_ALWAYS_FATAL_IF(!token, "%s: No internal display", __FUNCTION__);

        const status_t status = SurfaceComposerClient::getStaticDisplayInfo(token, &info);
@@ -48,7 +51,10 @@ const ui::DisplayMode& getActiveDisplayMode() {
        config.xDpi = config.yDpi = 320.f;
        config.refreshRate = 60.f;
#else
        const sp<IBinder> token = SurfaceComposerClient::getInternalDisplayToken();
        const std::vector<PhysicalDisplayId> ids = SurfaceComposerClient::getPhysicalDisplayIds();
        LOG_ALWAYS_FATAL_IF(ids.empty(), "%s: No displays", __FUNCTION__);

        const sp<IBinder> token = SurfaceComposerClient::getPhysicalDisplayToken(ids.front());
        LOG_ALWAYS_FATAL_IF(!token, "%s: No internal display", __FUNCTION__);

        const status_t status = SurfaceComposerClient::getActiveDisplayMode(token, &config);