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

Commit 3413d667 authored by Ady Abraham's avatar Ady Abraham Committed by Automerger Merge Worker
Browse files

Merge "composer: 2.4: vts: do not try to delay a config change outside a...

Merge "composer: 2.4: vts: do not try to delay a config change outside a group" into sc-dev am: a7c8c514 am: ce6fd284

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/14910110

Change-Id: Ie7e1d94fcee1bf15a815169645cbdae51076ce80
parents 0b1712f0 ce6fd284
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -561,17 +561,28 @@ void GraphicsComposerHidlTest::Test_setActiveConfigWithConstraints(const TestPar
            setActiveConfig(display, config1);
            sendRefreshFrame(display, nullptr);

            int32_t vsyncPeriod1 = mComposerClient->getDisplayAttribute_2_4(
            const auto vsyncPeriod1 = mComposerClient->getDisplayAttribute_2_4(
                    display.get(), config1,
                    IComposerClient::IComposerClient::Attribute::VSYNC_PERIOD);
            int32_t vsyncPeriod2 = mComposerClient->getDisplayAttribute_2_4(
            const auto configGroup1 = mComposerClient->getDisplayAttribute_2_4(
                    display.get(), config1,
                    IComposerClient::IComposerClient::Attribute::CONFIG_GROUP);
            const auto vsyncPeriod2 = mComposerClient->getDisplayAttribute_2_4(
                    display.get(), config2,
                    IComposerClient::IComposerClient::Attribute::VSYNC_PERIOD);
            const auto configGroup2 = mComposerClient->getDisplayAttribute_2_4(
                    display.get(), config2,
                    IComposerClient::IComposerClient::Attribute::CONFIG_GROUP);

            if (vsyncPeriod1 == vsyncPeriod2) {
                return;  // continue
            }

            // We don't allow delayed change when changing config groups
            if (params.delayForChange > 0 && configGroup1 != configGroup2) {
                return;  // continue
            }

            VsyncPeriodChangeTimeline timeline;
            IComposerClient::VsyncPeriodChangeConstraints constraints = {
                    .desiredTimeNanos = systemTime() + params.delayForChange,