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

Commit 3defa56f authored by Stephen Kiazyk's avatar Stephen Kiazyk Committed by android-build-merger
Browse files

Merge "Prevent buggy display orientation when exiting vr" into oc-dev am: 95d4e522

am: 71c79d34

Change-Id: I823d21b127cd9e90a536da7df3517f16812701c3
parents 5176d1be 71c79d34
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);
}