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

Commit a6d4233e authored by David Sodman's avatar David Sodman
Browse files

SF: setCompositionType when Client composition

Make sure that the compositionType is set at the HWC
when the compositionType is HWC2::Composition::Client.

Test: run cts -m CtsViewTestCases, rotate screen
Change-Id: I299e7db9c98bc6e1b57bf1090aad79d1807ee566
parent 95582564
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2182,7 +2182,16 @@ void SurfaceFlinger::setUpHWComposer(const CompositionInfo& compositionInfo) {
    switch (compositionInfo.compositionType)
    {
        case HWC2::Composition::Invalid:
            break;

        case HWC2::Composition::Client:
            if (compositionInfo.hwc.hwcLayer) {
                auto error = (compositionInfo.hwc.hwcLayer)->
                    setCompositionType(compositionInfo.compositionType);
                ALOGE_IF(error != HWC2::Error::None,
                        "[SF] Failed to set composition type: %s (%d)",
                            to_string(error).c_str(), static_cast<int32_t>(error));
            }
            break;

        case HWC2::Composition::Sideband: