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

Unified Diff: chrome/browser/android/vr_shell/vr_shell.h

Issue 2308683004: Added WebVR Render path to VrShell (Closed)
Patch Set: Addressed feedback Created 4 years, 3 months 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 | « chrome/browser/android/vr_shell/DEPS ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_shell.h
diff --git a/chrome/browser/android/vr_shell/vr_shell.h b/chrome/browser/android/vr_shell/vr_shell.h
index 4fcff02aca8e683e1b218bd9d2cd14a4118cbffa..585d6fd1c2d23aad14e083a4b5f5ee42c1614368 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -10,6 +10,7 @@
#include "base/android/jni_weak_ref.h"
#include "base/macros.h"
+#include "device/vr/android/gvr/gvr_delegate.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h"
@@ -27,7 +28,7 @@ class ContentRect {
int content_texture_handle;
};
-class VrShell {
+class VrShell : public device::GvrDelegate {
public:
VrShell(JNIEnv* env, jobject obj);
@@ -43,12 +44,22 @@ class VrShell {
void OnPause(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
void OnResume(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
+ // GvrDelegate
+ void RequestWebVRPresent() override;
+ void ExitWebVRPresent() override;
+ void SubmitWebVRFrame() override;
+ void UpdateWebVRTextureBounds(
+ int eye, float left, float top, float width, float height) override;
+ gvr::GvrApi* gvr_api() override;
+
private:
- ~VrShell();
+ virtual ~VrShell();
+ void DrawVrShell();
void DrawEye(const gvr::Mat4f& view_matrix,
const gvr::BufferViewport& params);
void DrawContentRect();
+ void DrawWebVr();
std::unique_ptr<ContentRect> content_rect_;
std::unique_ptr<gvr::GvrApi> gvr_api_;
@@ -67,6 +78,8 @@ class VrShell {
base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_;
+ bool webvr_mode_;
+
DISALLOW_COPY_AND_ASSIGN(VrShell);
};
« no previous file with comments | « chrome/browser/android/vr_shell/DEPS ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698