| 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 OnContentFrameAvailable(); | 141 void OnContentFrameAvailable(); |
| 142 void OnWebVRFrameAvailable(); | 142 void OnWebVRFrameAvailable(); |
| 143 bool GetPixelEncodedFrameIndex(uint16_t* frame_index); | 143 bool GetPixelEncodedFrameIndex(uint16_t* frame_index); |
| 144 | 144 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 uint8_t frame_index_ = 0; | 226 uint8_t frame_index_ = 0; |
| 227 // Larger than frame_index_ so it can be initialized out-of-band. | 227 // Larger than frame_index_ so it can be initialized out-of-band. |
| 228 uint16_t last_frame_index_ = -1; | 228 uint16_t last_frame_index_ = -1; |
| 229 | 229 |
| 230 // Attributes for gesture detection while holding app button. | 230 // Attributes for gesture detection while holding app button. |
| 231 gfx::Vector3dF controller_start_direction_; | 231 gfx::Vector3dF controller_start_direction_; |
| 232 | 232 |
| 233 std::unique_ptr<FPSMeter> fps_meter_; | 233 std::unique_ptr<FPSMeter> fps_meter_; |
| 234 | 234 |
| 235 gfx::Point3F pointer_start_; |
| 236 |
| 235 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; | 237 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; |
| 236 | 238 |
| 237 DISALLOW_COPY_AND_ASSIGN(VrShellGl); | 239 DISALLOW_COPY_AND_ASSIGN(VrShellGl); |
| 238 }; | 240 }; |
| 239 | 241 |
| 240 } // namespace vr_shell | 242 } // namespace vr_shell |
| 241 | 243 |
| 242 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ | 244 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ |
| OLD | NEW |