OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 const base::android::JavaParamRef<jobject>& surface); | 86 const base::android::JavaParamRef<jobject>& surface); |
87 | 87 |
88 private: | 88 private: |
89 virtual ~VrShell(); | 89 virtual ~VrShell(); |
90 void LoadUIContent(); | 90 void LoadUIContent(); |
91 void DrawVrShell(int64_t time); | 91 void DrawVrShell(int64_t time); |
92 void DrawEye(const gvr::Mat4f& view_matrix, | 92 void DrawEye(const gvr::Mat4f& view_matrix, |
93 const gvr::BufferViewport& params); | 93 const gvr::BufferViewport& params); |
94 void DrawContentRect(); | 94 void DrawContentRect(); |
95 void DrawWebVr(); | 95 void DrawWebVr(); |
| 96 void DrawWebVrOverlay(int64_t present_time_nanos); |
| 97 void DrawWebVrEye(const gvr::Mat4f& view_matrix, |
| 98 const gvr::BufferViewport& params, |
| 99 int64_t present_time_nanos); |
96 void DrawUI(); | 100 void DrawUI(); |
97 void DrawCursor(); | 101 void DrawCursor(); |
98 | 102 |
99 void UpdateController(); | 103 void UpdateController(); |
100 | 104 |
101 // samplerExternalOES texture data for UI content image. | 105 // samplerExternalOES texture data for UI content image. |
102 jint ui_texture_id_ = 0; | 106 jint ui_texture_id_ = 0; |
103 // samplerExternalOES texture data for main content image. | 107 // samplerExternalOES texture data for main content image. |
104 jint content_texture_id_ = 0; | 108 jint content_texture_id_ = 0; |
105 | 109 |
(...skipping 28 matching lines...) Expand all Loading... |
134 std::unique_ptr<VrShellRenderer> vr_shell_renderer_; | 138 std::unique_ptr<VrShellRenderer> vr_shell_renderer_; |
135 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; | 139 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; |
136 | 140 |
137 gvr::Quatf controller_quat_; | 141 gvr::Quatf controller_quat_; |
138 bool controller_active_ = false; | 142 bool controller_active_ = false; |
139 gvr::Vec3f look_at_vector_; | 143 gvr::Vec3f look_at_vector_; |
140 int ui_tex_width_ = 0; | 144 int ui_tex_width_ = 0; |
141 int ui_tex_height_ = 0; | 145 int ui_tex_height_ = 0; |
142 | 146 |
143 bool webvr_mode_ = false; | 147 bool webvr_mode_ = false; |
144 bool webvr_secure_origin_; | 148 bool webvr_secure_origin_ = false; |
| 149 int64_t webvr_warning_end_nanos_ = 0; |
145 | 150 |
146 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 151 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
147 | 152 |
148 DISALLOW_COPY_AND_ASSIGN(VrShell); | 153 DISALLOW_COPY_AND_ASSIGN(VrShell); |
149 }; | 154 }; |
150 | 155 |
151 bool RegisterVrShell(JNIEnv* env); | 156 bool RegisterVrShell(JNIEnv* env); |
152 | 157 |
153 } // namespace vr_shell | 158 } // namespace vr_shell |
154 | 159 |
155 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 160 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
OLD | NEW |