| 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_GL_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 const std::vector<const UiElement*>& elements); | 123 const std::vector<const UiElement*>& elements); |
| 124 std::vector<const UiElement*> GetElementsInDrawOrder( | 124 std::vector<const UiElement*> GetElementsInDrawOrder( |
| 125 const vr::Mat4f& view_matrix, | 125 const vr::Mat4f& view_matrix, |
| 126 const std::vector<const UiElement*>& elements); | 126 const std::vector<const UiElement*>& elements); |
| 127 void DrawCursor(const vr::Mat4f& render_matrix); | 127 void DrawCursor(const vr::Mat4f& render_matrix); |
| 128 void DrawController(const vr::Mat4f& view_proj_matrix); | 128 void DrawController(const vr::Mat4f& view_proj_matrix); |
| 129 bool ShouldDrawWebVr(); | 129 bool ShouldDrawWebVr(); |
| 130 void DrawWebVr(); | 130 void DrawWebVr(); |
| 131 bool WebVrPoseByteIsValid(int pose_index_byte); | 131 bool WebVrPoseByteIsValid(int pose_index_byte); |
| 132 | 132 |
| 133 void UpdateController(); | 133 void UpdateController(const gfx::Vector3dF& head_direction); |
| 134 void HandleControllerInput(const gfx::Vector3dF& forward_vector); | 134 void HandleControllerInput(const gfx::Vector3dF& head_direction); |
| 135 void HandleControllerAppButtonActivity( | 135 void HandleControllerAppButtonActivity( |
| 136 const gfx::Vector3dF& controller_direction); | 136 const gfx::Vector3dF& controller_direction); |
| 137 void SendEventsToTarget(InputTarget input_target, int pixel_x, int pixel_y); | 137 void SendEventsToTarget(InputTarget input_target, int pixel_x, int pixel_y); |
| 138 void SendGesture(InputTarget input_target, | 138 void SendGesture(InputTarget input_target, |
| 139 std::unique_ptr<blink::WebInputEvent> event); | 139 std::unique_ptr<blink::WebInputEvent> event); |
| 140 void CreateUiSurface(); | 140 void CreateUiSurface(); |
| 141 void OnUIFrameAvailable(); | 141 void OnUIFrameAvailable(); |
| 142 void OnContentFrameAvailable(); | 142 void OnContentFrameAvailable(); |
| 143 void OnWebVRFrameAvailable(); | 143 void OnWebVRFrameAvailable(); |
| 144 bool GetPixelEncodedFrameIndex(uint16_t* frame_index); | 144 bool GetPixelEncodedFrameIndex(uint16_t* frame_index); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 uint8_t frame_index_ = 0; | 227 uint8_t frame_index_ = 0; |
| 228 // Larger than frame_index_ so it can be initialized out-of-band. | 228 // Larger than frame_index_ so it can be initialized out-of-band. |
| 229 uint16_t last_frame_index_ = -1; | 229 uint16_t last_frame_index_ = -1; |
| 230 | 230 |
| 231 // Attributes for gesture detection while holding app button. | 231 // Attributes for gesture detection while holding app button. |
| 232 gfx::Vector3dF controller_start_direction_; | 232 gfx::Vector3dF controller_start_direction_; |
| 233 | 233 |
| 234 std::unique_ptr<FPSMeter> fps_meter_; | 234 std::unique_ptr<FPSMeter> fps_meter_; |
| 235 | 235 |
| 236 gfx::Point3F pointer_start_; |
| 237 |
| 236 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; | 238 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; |
| 237 | 239 |
| 238 DISALLOW_COPY_AND_ASSIGN(VrShellGl); | 240 DISALLOW_COPY_AND_ASSIGN(VrShellGl); |
| 239 }; | 241 }; |
| 240 | 242 |
| 241 } // namespace vr_shell | 243 } // namespace vr_shell |
| 242 | 244 |
| 243 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ | 245 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ |
| OLD | NEW |