| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 std::unique_ptr<gvr::BufferViewport> headlocked_right_viewport_; | 160 std::unique_ptr<gvr::BufferViewport> headlocked_right_viewport_; |
| 161 std::unique_ptr<gvr::BufferViewport> webvr_left_viewport_; | 161 std::unique_ptr<gvr::BufferViewport> webvr_left_viewport_; |
| 162 std::unique_ptr<gvr::BufferViewport> webvr_right_viewport_; | 162 std::unique_ptr<gvr::BufferViewport> webvr_right_viewport_; |
| 163 std::unique_ptr<gvr::SwapChain> swap_chain_; | 163 std::unique_ptr<gvr::SwapChain> swap_chain_; |
| 164 | 164 |
| 165 // Current sizes for the render buffers. | 165 // Current sizes for the render buffers. |
| 166 gvr::Sizei render_size_primary_; | 166 gvr::Sizei render_size_primary_; |
| 167 gvr::Sizei render_size_headlocked_; | 167 gvr::Sizei render_size_headlocked_; |
| 168 | 168 |
| 169 // Intended size for the primary render buffer by UI mode. | 169 // Intended size for the primary render buffer by UI mode. |
| 170 gvr::Sizei render_size_primary_webvr_ = device::kFallbackRenderTargetSize; | 170 // For WebVR, a size of 0x0 is used to indicate "not yet ready" |
| 171 // to suppress rendering while still initializing. |
| 172 gvr::Sizei render_size_primary_webvr_ = device::kInvalidRenderTargetSize; |
| 171 gvr::Sizei render_size_primary_vrshell_; | 173 gvr::Sizei render_size_primary_vrshell_; |
| 172 | 174 |
| 173 std::queue<base::Callback<void()>> task_queue_; | 175 std::queue<base::Callback<void()>> task_queue_; |
| 174 base::Lock task_queue_lock_; | 176 base::Lock task_queue_lock_; |
| 175 base::Lock gvr_init_lock_; | 177 base::Lock gvr_init_lock_; |
| 176 | 178 |
| 177 std::unique_ptr<VrCompositor> content_compositor_; | 179 std::unique_ptr<VrCompositor> content_compositor_; |
| 178 content::WebContents* main_contents_; | 180 content::WebContents* main_contents_; |
| 179 std::unique_ptr<VrCompositor> ui_compositor_; | 181 std::unique_ptr<VrCompositor> ui_compositor_; |
| 180 content::WebContents* ui_contents_; | 182 content::WebContents* ui_contents_; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 217 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
| 216 | 218 |
| 217 DISALLOW_COPY_AND_ASSIGN(VrShell); | 219 DISALLOW_COPY_AND_ASSIGN(VrShell); |
| 218 }; | 220 }; |
| 219 | 221 |
| 220 bool RegisterVrShell(JNIEnv* env); | 222 bool RegisterVrShell(JNIEnv* env); |
| 221 | 223 |
| 222 } // namespace vr_shell | 224 } // namespace vr_shell |
| 223 | 225 |
| 224 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 226 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
| OLD | NEW |