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

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

Merge "Prevent buggy display orientation when exiting vr" into oc-dev

parents 8c109c63 82386cd4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1262,7 +1262,6 @@ void SurfaceFlinger::resetHwcLocked() {
        }
    }
    mDisplays.clear();
    initializeDisplays();
}

void SurfaceFlinger::updateVrFlinger() {
@@ -1309,6 +1308,12 @@ void SurfaceFlinger::updateVrFlinger() {
    // parts of this class rely on the primary display always being available.
    createDefaultDisplayDevice();

    // Reset the timing values to account for the period of the swapped in HWC
    const auto& activeConfig = mHwc->getActiveConfig(HWC_DISPLAY_PRIMARY);
    const nsecs_t period = activeConfig->getVsyncPeriod();
    mAnimFrameTracker.setDisplayRefreshPeriod(period);
    setCompositorTimingSnapped(0, period, 0);

    android_atomic_or(1, &mRepaintEverything);
    setTransactionFlags(eDisplayTransactionNeeded);
}