| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 ~VrShellGl() override; | 66 ~VrShellGl() override; |
| 67 | 67 |
| 68 void Initialize(); | 68 void Initialize(); |
| 69 void InitializeGl(gfx::AcceleratedWidget window); | 69 void InitializeGl(gfx::AcceleratedWidget window); |
| 70 | 70 |
| 71 void OnTriggerEvent(); | 71 void OnTriggerEvent(); |
| 72 void OnPause(); | 72 void OnPause(); |
| 73 void OnResume(); | 73 void OnResume(); |
| 74 | 74 |
| 75 void SetWebVrMode(bool enabled); | 75 void SetWebVrMode(bool enabled); |
| 76 void CreateContentSurface(); |
| 76 void ContentBoundsChanged(int width, int height); | 77 void ContentBoundsChanged(int width, int height); |
| 77 void ContentPhysicalBoundsChanged(int width, int height); | 78 void ContentPhysicalBoundsChanged(int width, int height); |
| 78 void UIBoundsChanged(int width, int height); | 79 void UIBoundsChanged(int width, int height); |
| 79 void UIPhysicalBoundsChanged(int width, int height); | 80 void UIPhysicalBoundsChanged(int width, int height); |
| 80 base::WeakPtr<VrShellGl> GetWeakPtr(); | 81 base::WeakPtr<VrShellGl> GetWeakPtr(); |
| 81 | 82 |
| 82 void UpdateWebVRTextureBounds(int16_t frame_index, | 83 void UpdateWebVRTextureBounds(int16_t frame_index, |
| 83 const gvr::Rectf& left_bounds, | 84 const gvr::Rectf& left_bounds, |
| 84 const gvr::Rectf& right_bounds); | 85 const gvr::Rectf& right_bounds); |
| 85 void SetGvrPoseForWebVr(const gvr::Mat4f& pose, uint32_t pose_num); | 86 void SetGvrPoseForWebVr(const gvr::Mat4f& pose, uint32_t pose_num); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 107 const std::vector<const ContentRectangle*>& elements); | 108 const std::vector<const ContentRectangle*>& elements); |
| 108 void DrawCursor(const gvr::Mat4f& render_matrix); | 109 void DrawCursor(const gvr::Mat4f& render_matrix); |
| 109 void DrawWebVr(); | 110 void DrawWebVr(); |
| 110 bool WebVrPoseByteIsValid(int pose_index_byte); | 111 bool WebVrPoseByteIsValid(int pose_index_byte); |
| 111 | 112 |
| 112 void UpdateController(const gvr::Vec3f& forward_vector); | 113 void UpdateController(const gvr::Vec3f& forward_vector); |
| 113 void SendEventsToTarget(InputTarget input_target, int pixel_x, | 114 void SendEventsToTarget(InputTarget input_target, int pixel_x, |
| 114 int pixel_y); | 115 int pixel_y); |
| 115 void SendGesture(InputTarget input_target, | 116 void SendGesture(InputTarget input_target, |
| 116 std::unique_ptr<blink::WebInputEvent> event); | 117 std::unique_ptr<blink::WebInputEvent> event); |
| 117 | 118 void CreateUiSurface(); |
| 118 void OnUIFrameAvailable(); | 119 void OnUIFrameAvailable(); |
| 119 void OnContentFrameAvailable(); | 120 void OnContentFrameAvailable(); |
| 120 bool GetPixelEncodedFrameIndex(uint16_t* frame_index); | 121 bool GetPixelEncodedFrameIndex(uint16_t* frame_index); |
| 121 | 122 |
| 122 void OnVSync(); | 123 void OnVSync(); |
| 123 | 124 |
| 124 // VRVSyncProvider | 125 // VRVSyncProvider |
| 125 void GetVSync(const GetVSyncCallback& callback) override; | 126 void GetVSync(const GetVSyncCallback& callback) override; |
| 126 | 127 |
| 127 void ForceExitVr(); | 128 void ForceExitVr(); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 uint16_t last_frame_index_ = -1; | 202 uint16_t last_frame_index_ = -1; |
| 202 | 203 |
| 203 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; | 204 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; |
| 204 | 205 |
| 205 DISALLOW_COPY_AND_ASSIGN(VrShellGl); | 206 DISALLOW_COPY_AND_ASSIGN(VrShellGl); |
| 206 }; | 207 }; |
| 207 | 208 |
| 208 } // namespace vr_shell | 209 } // namespace vr_shell |
| 209 | 210 |
| 210 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ | 211 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ |
| OLD | NEW |