Commit 1920a358 authored by Michael Thiessen's avatar Michael Thiessen Committed by Commit Bot

VR: Don't animate control container.

It seems like the races between the hiding propagating and us showing
the controls goes away when we turn off animations. I don't remember why
we originally had to animate the controls, but I think whatever problems
that was working around have since been fixed.

Bug: 840891
Change-Id: I5420ba311c82ef284514667d5c8eb66b9e387654
Reviewed-on: https://chromium-review.googlesource.com/1072735Reviewed-by: default avatarBiao She <bshe@chromium.org>
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561910}
parent afe76385
......@@ -35,7 +35,6 @@ import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.ChromeTabbedActivity;
import org.chromium.chrome.browser.compositor.CompositorView;
import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager;
import org.chromium.chrome.browser.modaldialog.ModalDialogManager;
import org.chromium.chrome.browser.page_info.PageInfoController;
import org.chromium.chrome.browser.tab.EmptyTabObserver;
......@@ -427,7 +426,7 @@ public class VrShellImpl
if (mTab != null) {
initializeTabForVR();
mTab.addObserver(mTabObserver);
mTab.updateBrowserControlsState(BrowserControlsState.HIDDEN, true);
mTab.updateBrowserControlsState(BrowserControlsState.HIDDEN, false);
}
mTabObserver.onContentChanged(mTab);
}
......@@ -730,7 +729,7 @@ public class VrShellImpl
View parent = mTab.getContentView();
mTab.getWebContents().setSize(parent.getWidth(), parent.getHeight());
}
mTab.updateBrowserControlsState(BrowserControlsState.SHOWN, true);
mTab.updateBrowserControlsState(BrowserControlsState.SHOWN, false);
}
mContentVirtualDisplay.destroy();
......@@ -741,18 +740,6 @@ public class VrShellImpl
mActivity.getToolbarManager().setProgressBarEnabled(true);
}
// Since VSync was paused, control heights may not have been propagated. If we request to
// show the controls before the old values have propagated we'll end up with the old values
// (ie. the controls hidden). The values will have propagated with the next frame received
// from the compositor, so we can tell the controls to show at that point.
if (mActivity.getCompositorViewHolder() != null
&& mActivity.getCompositorViewHolder().getCompositorView() != null) {
mActivity.getCompositorViewHolder().getCompositorView().surfaceRedrawNeededAsync(() -> {
ChromeFullscreenManager manager = mActivity.getFullscreenManager();
manager.getBrowserVisibilityDelegate().showControlsTransient();
});
}
FrameLayout decor = (FrameLayout) mActivity.getWindow().getDecorView();
decor.removeView(mUiView);
super.shutdown();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment