| 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 585d6fd1c2d23aad14e083a4b5f5ee42c1614368..b415f2ab5a2692a16c498f296f27f4de6b037f72 100644
|
| --- a/chrome/browser/android/vr_shell/vr_shell.h
|
| +++ b/chrome/browser/android/vr_shell/vr_shell.h
|
| @@ -7,33 +7,26 @@
|
|
|
| #include <jni.h>
|
| #include <memory>
|
| +#include <vector>
|
|
|
| #include "base/android/jni_weak_ref.h"
|
| #include "base/macros.h"
|
| +#include "chrome/browser/android/vr_shell/ui_elements.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"
|
|
|
| +
|
| namespace vr_shell {
|
|
|
| class VrShellRenderer;
|
|
|
| -class ContentRect {
|
| - public:
|
| - ContentRect();
|
| - ~ContentRect();
|
| - void SetIdentity();
|
| - void Translate(float x, float y, float z);
|
| - gvr::Mat4f transfrom_to_world;
|
| - int content_texture_handle;
|
| -};
|
|
|
| class VrShell : public device::GvrDelegate {
|
| public:
|
| VrShell(JNIEnv* env, jobject obj);
|
|
|
| void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
|
| -
|
| void GvrInit(JNIEnv* env,
|
| const base::android::JavaParamRef<jobject>& obj,
|
| jlong native_gvr_api);
|
| @@ -54,14 +47,28 @@ class VrShell : public device::GvrDelegate {
|
|
|
| private:
|
| virtual ~VrShell();
|
| -
|
| void DrawVrShell();
|
| void DrawEye(const gvr::Mat4f& view_matrix,
|
| const gvr::BufferViewport& params);
|
| void DrawContentRect();
|
| void DrawWebVr();
|
| + void DrawUI();
|
| +
|
| + void UpdateTransforms(float screen_width_meters,
|
| + float screen_height_meters,
|
| + float scree_tilt);
|
| +
|
| + // samplerExternalOES texture data for content area image.
|
| + jint content_texture_id_ = 0;
|
| +
|
| + float desktop_screen_tilt_;
|
| + float desktop_height_;
|
| +
|
| + ContentRectangle* desktop_plane_;
|
| + gvr::Vec3f desktop_position_;
|
| +
|
| + std::vector<std::unique_ptr<ContentRectangle>> ui_rects_;
|
|
|
| - std::unique_ptr<ContentRect> content_rect_;
|
| std::unique_ptr<gvr::GvrApi> gvr_api_;
|
| std::unique_ptr<gvr::BufferViewportList> buffer_viewport_list_;
|
| std::unique_ptr<gvr::BufferViewport> buffer_viewport_;
|
| @@ -75,10 +82,9 @@ class VrShell : public device::GvrDelegate {
|
| gvr::Sizei render_size_;
|
|
|
| std::unique_ptr<VrShellRenderer> vr_shell_renderer_;
|
| -
|
| base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_;
|
|
|
| - bool webvr_mode_;
|
| + bool webvr_mode_ = false;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(VrShell);
|
| };
|
|
|