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

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

Issue 2739973002: Revert of WebVR compositor bypass via BrowserMain context + mailbox (Closed)
Patch Set: Created 3 years, 9 months 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
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 14 matching lines...) Expand all
25 } 25 }
26 26
27 namespace blink { 27 namespace blink {
28 class WebInputEvent; 28 class WebInputEvent;
29 } 29 }
30 30
31 namespace content { 31 namespace content {
32 class WebContents; 32 class WebContents;
33 } 33 }
34 34
35 namespace gpu {
36 struct MailboxHolder;
37 }
38
39 namespace ui { 35 namespace ui {
40 class WindowAndroid; 36 class WindowAndroid;
41 } 37 }
42 38
43 namespace vr_shell { 39 namespace vr_shell {
44 40
45 class AndroidUiGestureTarget; 41 class AndroidUiGestureTarget;
46 class UiInterface; 42 class UiInterface;
47 class VrCompositor; 43 class VrCompositor;
48 class VrGLThread; 44 class VrGLThread;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 162
167 void ForceExitVr(); 163 void ForceExitVr();
168 164
169 void ProcessUIGesture(std::unique_ptr<blink::WebInputEvent> event); 165 void ProcessUIGesture(std::unique_ptr<blink::WebInputEvent> event);
170 void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent> event); 166 void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent> event);
171 167
172 // TODO(mthiesse): Find a better place for these functions to live. 168 // TODO(mthiesse): Find a better place for these functions to live.
173 static device::mojom::VRPosePtr VRPosePtrFromGvrPose(gvr::Mat4f head_mat); 169 static device::mojom::VRPosePtr VRPosePtrFromGvrPose(gvr::Mat4f head_mat);
174 static device::mojom::VRDisplayInfoPtr CreateVRDisplayInfo( 170 static device::mojom::VRDisplayInfoPtr CreateVRDisplayInfo(
175 gvr::GvrApi* gvr_api, 171 gvr::GvrApi* gvr_api,
176 gvr::Sizei recommended_size, 172 gvr::Sizei compositor_size,
177 uint32_t device_id); 173 uint32_t device_id);
178 174
179 private: 175 private:
180 ~VrShell() override; 176 ~VrShell() override;
181 void PostToGlThreadWhenReady(const base::Closure& task); 177 void PostToGlThreadWhenReady(const base::Closure& task);
182 void SetContentPaused(bool paused); 178 void SetContentPaused(bool paused);
183 void SetUiState(); 179 void SetUiState();
184 180
185 // content::WebContentsObserver implementation. 181 // content::WebContentsObserver implementation.
186 void RenderViewHostChanged(content::RenderViewHost* old_host, 182 void RenderViewHostChanged(content::RenderViewHost* old_host,
187 content::RenderViewHost* new_host) override; 183 content::RenderViewHost* new_host) override;
188 void MainFrameWasResized(bool width_changed) override; 184 void MainFrameWasResized(bool width_changed) override;
189 void WebContentsDestroyed() override; 185 void WebContentsDestroyed() override;
190 186
191 // device::GvrDelegate implementation 187 // device::GvrDelegate implementation
192 void SetWebVRSecureOrigin(bool secure_origin) override; 188 void SetWebVRSecureOrigin(bool secure_origin) override;
193 void SubmitWebVRFrame(int16_t frame_index, 189 void SubmitWebVRFrame() override;
194 const gpu::MailboxHolder& mailbox) override;
195 void UpdateWebVRTextureBounds(int16_t frame_index, 190 void UpdateWebVRTextureBounds(int16_t frame_index,
196 const gvr::Rectf& left_bounds, 191 const gvr::Rectf& left_bounds,
197 const gvr::Rectf& right_bounds, 192 const gvr::Rectf& right_bounds) override;
198 const gvr::Sizei& source_size) override;
199 void OnVRVsyncProviderRequest( 193 void OnVRVsyncProviderRequest(
200 device::mojom::VRVSyncProviderRequest request) override; 194 device::mojom::VRVSyncProviderRequest request) override;
201 void UpdateVSyncInterval(int64_t timebase_nanos, 195 void UpdateVSyncInterval(int64_t timebase_nanos,
202 double interval_seconds) override; 196 double interval_seconds) override;
203 bool SupportsPresentation() override; 197 bool SupportsPresentation() override;
204 void ResetPose() override; 198 void ResetPose() override;
205 void CreateVRDisplayInfo( 199 void CreateVRDisplayInfo(
206 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, 200 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback,
207 uint32_t device_id) override; 201 uint32_t device_id) override;
208 202
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 base::WeakPtrFactory<VrShell> weak_ptr_factory_; 238 base::WeakPtrFactory<VrShell> weak_ptr_factory_;
245 239
246 DISALLOW_COPY_AND_ASSIGN(VrShell); 240 DISALLOW_COPY_AND_ASSIGN(VrShell);
247 }; 241 };
248 242
249 bool RegisterVrShell(JNIEnv* env); 243 bool RegisterVrShell(JNIEnv* env);
250 244
251 } // namespace vr_shell 245 } // namespace vr_shell
252 246
253 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 247 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698