Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(801)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java

Issue 2471433002: Implement WebVR presentation pausing for VR Shell Menu Mode (Closed)
Patch Set: Address Comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java
index 470b8fee24bb8d89551590c8d2f20aa21f6111a7..641a4e73e66c73a708afbbdae9fa038e47422f5b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java
@@ -276,6 +276,7 @@ public class VrShellImpl extends GvrLayout implements GLSurfaceView.Renderer, Vr
@Override
public void onResume() {
super.onResume();
+ mGlSurfaceView.onResume();
if (mNativeVrShell != 0) {
// Refreshing the viewer profile accesses disk, so we need to temporarily allow disk
// reads. The GVR team promises this will be fixed when they launch.
@@ -291,6 +292,7 @@ public class VrShellImpl extends GvrLayout implements GLSurfaceView.Renderer, Vr
@Override
public void onPause() {
super.onPause();
+ mGlSurfaceView.onPause();
if (mNativeVrShell != 0) {
nativeOnPause(mNativeVrShell);
}
@@ -300,6 +302,8 @@ public class VrShellImpl extends GvrLayout implements GLSurfaceView.Renderer, Vr
public void shutdown() {
super.shutdown();
if (mNativeVrShell != 0) {
+ // Ensure our GL thread is stopped before we destroy the native VR Shell.
+ mGlSurfaceView.onPause();
nativeDestroy(mNativeVrShell);
mNativeVrShell = 0;
}
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/BUILD.gn » ('j') | chrome/browser/android/vr_shell/vr_shell_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698