Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell.h

Issue 2550803002: WebVR: avoid race conditions for partially-initialized display (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698