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 | 9 |
10 #include "base/cancelable_callback.h" | 10 #include "base/cancelable_callback.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 void OnPause(); | 70 void OnPause(); |
71 void OnResume(); | 71 void OnResume(); |
72 | 72 |
73 void SetWebVrMode(bool enabled); | 73 void SetWebVrMode(bool enabled); |
74 void ContentBoundsChanged(int width, int height); | 74 void ContentBoundsChanged(int width, int height); |
75 void ContentPhysicalBoundsChanged(int width, int height); | 75 void ContentPhysicalBoundsChanged(int width, int height); |
76 void UIBoundsChanged(int width, int height); | 76 void UIBoundsChanged(int width, int height); |
77 void UIPhysicalBoundsChanged(int width, int height); | 77 void UIPhysicalBoundsChanged(int width, int height); |
78 base::WeakPtr<VrShellGl> GetWeakPtr(); | 78 base::WeakPtr<VrShellGl> GetWeakPtr(); |
79 | 79 |
80 void UpdateWebVRTextureBounds(const gvr::Rectf& left_bounds, | 80 void UpdateWebVRTextureBounds(uint32_t frame_index, |
| 81 const gvr::Rectf& left_bounds, |
81 const gvr::Rectf& right_bounds); | 82 const gvr::Rectf& right_bounds); |
82 gvr::GvrApi* gvr_api(); | 83 gvr::GvrApi* gvr_api(); |
83 void SetGvrPoseForWebVr(const gvr::Mat4f& pose, uint32_t pose_num); | 84 void SetGvrPoseForWebVr(const gvr::Mat4f& pose, uint32_t pose_num); |
84 gvr::Sizei GetWebVRCompositorSurfaceSize(); | 85 gvr::Sizei GetWebVRCompositorSurfaceSize(); |
85 | 86 |
86 void UpdateScene(std::unique_ptr<base::ListValue> commands); | 87 void UpdateScene(std::unique_ptr<base::ListValue> commands); |
87 | 88 |
88 private: | 89 private: |
89 void GvrInit(gvr_context* gvr_api); | 90 void GvrInit(gvr_context* gvr_api); |
90 void InitializeRenderer(); | 91 void InitializeRenderer(); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 181 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
181 | 182 |
182 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; | 183 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; |
183 | 184 |
184 DISALLOW_COPY_AND_ASSIGN(VrShellGl); | 185 DISALLOW_COPY_AND_ASSIGN(VrShellGl); |
185 }; | 186 }; |
186 | 187 |
187 } // namespace vr_shell | 188 } // namespace vr_shell |
188 | 189 |
189 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ | 190 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ |
OLD | NEW |