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

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: rebase 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
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7b82f344806fefe1bd82f00dd9031b2c58e67448..9fcaf3e525168bb182e9bbdbde589706c360de51 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
@@ -279,6 +279,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.
@@ -294,6 +295,7 @@ public class VrShellImpl extends GvrLayout implements GLSurfaceView.Renderer, Vr
@Override
public void onPause() {
super.onPause();
+ mGlSurfaceView.onPause();
if (mNativeVrShell != 0) {
nativeOnPause(mNativeVrShell);
}
@@ -303,6 +305,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698