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

Commit 2f5aec70 authored by Midas Chien's avatar Midas Chien
Browse files

composer: vts: send refresh frame even composition changes

sendRefreshFrame is used to send refresh frame to composer, so even
composition changes should present frame to composer.

Bug: 157638511
Test: VtsHalGraphicsComposerV2_4TargetTest on C2, R3
Change-Id: I325668b7a75cbbe72841c424eb9fc43479ac48b6
parent 25ff02b7
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -414,12 +414,9 @@ void GraphicsComposerHidlCommandTest::sendRefreshFrame(const VsyncPeriodChangeTi

    mWriter->validateDisplay();
    execute();
    if (mReader->mCompositionChanges.size() != 0) {
        GTEST_SUCCEED() << "Composition change requested, skipping test";
        return;
    }

    ASSERT_EQ(0, mReader->mErrors.size());
    mReader->mCompositionChanges.clear();

    mWriter->presentDisplay();
    execute();
    ASSERT_EQ(0, mReader->mErrors.size());
@@ -427,8 +424,14 @@ void GraphicsComposerHidlCommandTest::sendRefreshFrame(const VsyncPeriodChangeTi
    mWriter->selectLayer(layer);
    auto handle2 = allocate();
    ASSERT_NE(nullptr, handle2);

    mWriter->setLayerBuffer(0, handle2, -1);
    mWriter->setLayerSurfaceDamage(std::vector<IComposerClient::Rect>(1, {0, 0, 10, 10}));
    mWriter->validateDisplay();
    execute();
    ASSERT_EQ(0, mReader->mErrors.size());
    mReader->mCompositionChanges.clear();

    mWriter->presentDisplay();
    execute();
}