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

Commit c2159564 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "SF: process ComposerHalVsync for the active display" into sc-v2-dev

parents 329ed55a e1166476
Loading
Loading
Loading
Loading
+8 −6
Original line number Original line Diff line number Diff line
@@ -1713,10 +1713,10 @@ void SurfaceFlinger::onComposerHalVsync(hal::HWDisplayId hwcDisplayId, int64_t t
    ATRACE_CALL();
    ATRACE_CALL();


    Mutex::Autolock lock(mStateLock);
    Mutex::Autolock lock(mStateLock);

    const auto displayId = getHwComposer().toPhysicalDisplayId(hwcDisplayId);
    if (const auto displayId = getHwComposer().toPhysicalDisplayId(hwcDisplayId)) {
    if (displayId) {
        auto token = getPhysicalDisplayTokenLocked(*displayId);
        const auto token = getPhysicalDisplayTokenLocked(*displayId);
        auto display = getDisplayDeviceLocked(token);
        const auto display = getDisplayDeviceLocked(token);
        display->onVsync(timestamp);
        display->onVsync(timestamp);
    }
    }


@@ -1724,8 +1724,10 @@ void SurfaceFlinger::onComposerHalVsync(hal::HWDisplayId hwcDisplayId, int64_t t
        return;
        return;
    }
    }


    if (hwcDisplayId != getHwComposer().getInternalHwcDisplayId()) {
    const bool isActiveDisplay =
        // For now, we don't do anything with external display vsyncs.
            displayId && getPhysicalDisplayTokenLocked(*displayId) == mActiveDisplayToken;
    if (!isActiveDisplay) {
        // For now, we don't do anything with non active display vsyncs.
        return;
        return;
    }
    }