| 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 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 virtual ~VrShell(); | 115 virtual ~VrShell(); |
| 116 void LoadUIContent(); | 116 void LoadUIContent(); |
| 117 bool IsUiTextureReady(); | 117 bool IsUiTextureReady(); |
| 118 // Converts a pixel rectangle to (0..1) float texture coordinates. | 118 // Converts a pixel rectangle to (0..1) float texture coordinates. |
| 119 // Callers need to ensure that the texture width/height is | 119 // Callers need to ensure that the texture width/height is |
| 120 // initialized by checking IsUiTextureReady() first. | 120 // initialized by checking IsUiTextureReady() first. |
| 121 Rectf MakeUiGlCopyRect(Recti pixel_rect); | 121 Rectf MakeUiGlCopyRect(Recti pixel_rect); |
| 122 void DrawVrShell(const gvr::Mat4f& head_pose); | 122 void DrawVrShell(const gvr::Mat4f& head_pose); |
| 123 void DrawEye(const gvr::Mat4f& view_matrix, | 123 void DrawEye(gvr::Eye eye, |
| 124 const gvr::Mat4f& head_pose, |
| 124 const gvr::BufferViewport& params); | 125 const gvr::BufferViewport& params); |
| 125 void DrawUI(const gvr::Mat4f& render_matrix); | 126 void DrawUI(const gvr::Mat4f& world_matrix, |
| 127 const gvr::Mat4f& fov_matrix); |
| 126 void DrawCursor(const gvr::Mat4f& render_matrix); | 128 void DrawCursor(const gvr::Mat4f& render_matrix); |
| 127 void DrawWebVr(); | 129 void DrawWebVr(); |
| 128 void DrawWebVrOverlay(int64_t present_time_nanos); | 130 void DrawWebVrOverlay(int64_t present_time_nanos); |
| 129 void DrawWebVrEye(const gvr::Mat4f& view_matrix, | 131 void DrawWebVrEye(const gvr::Mat4f& view_matrix, |
| 130 const gvr::BufferViewport& params, | 132 const gvr::BufferViewport& params, |
| 131 int64_t present_time_nanos); | 133 int64_t present_time_nanos); |
| 132 | 134 |
| 133 void UpdateController(const gvr::Vec3f& forward_vector); | 135 void UpdateController(const gvr::Vec3f& forward_vector); |
| 134 | 136 |
| 135 void HandleQueuedTasks(); | 137 void HandleQueuedTasks(); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 191 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
| 190 | 192 |
| 191 DISALLOW_COPY_AND_ASSIGN(VrShell); | 193 DISALLOW_COPY_AND_ASSIGN(VrShell); |
| 192 }; | 194 }; |
| 193 | 195 |
| 194 bool RegisterVrShell(JNIEnv* env); | 196 bool RegisterVrShell(JNIEnv* env); |
| 195 | 197 |
| 196 } // namespace vr_shell | 198 } // namespace vr_shell |
| 197 | 199 |
| 198 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 200 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
| OLD | NEW |