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

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

Merge "Release virtual display hwcId during vr mode transition." into oc-dev

parents f15e6fdf da8490da
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1242,6 +1242,13 @@ void SurfaceFlinger::resetHwc() {
    // mCurrentState and mDrawingState and re-apply all changes when we make the
    // transition.
    mDrawingState.displays.clear();
    // Release virtual display hwcId during vr mode transition.
    for (size_t displayId = 0; displayId < mDisplays.size(); ++displayId) {
        const sp<DisplayDevice>& displayDevice = mDisplays[displayId];
        if (displayDevice->getDisplayType() == DisplayDevice::DISPLAY_VIRTUAL) {
            displayDevice->disconnect(getHwComposer());
        }
    }
    mDisplays.clear();
    initializeDisplays();
}