Introduce ChromeVR to Chrome on Android (behind a build flag)
This CL implements the following:
1. Adds a new activity called VrActivity. It extends from AsyncInitializationActivity
and can only be launched from Daydream app.
2. Adds a VrShell and its native part. VrShell has a GLSurfaceView as presentation
view for drawing left and right images and an inheriated(from GvrLayout) scanline
racing view(another GLSurfaceView).
3. Created a texture quad that is reserved for compositor to use to output content
frames. The quad is positioned at (0.0, 0.0, -1.0)
Known issue:
1. The quad is black as we haven't hookup a compositor to draw frames
2. tabs are not shared with ChromeTabbedActivity
To test this, add "enable_vr_shell=true" in your gn args.
BUG=638642
Review-Url: https://codereview.chromium.org/2252103002
Cr-Commit-Position: refs/heads/master@{#414890}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 5351720..bcba015 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -741,6 +741,12 @@
]
}
+ if (enable_vr_shell && android_java_ui) {
+ defines += [ "ENABLE_VR_SHELL" ]
+ deps += [ "android/vr_shell:vr_shell" ]
+ configs += [ "//third_party/gvr-android-sdk:libgvr_config" ]
+ }
+
if (is_android) {
deps += [
"//components/cdm/browser",