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

Side by Side Diff: device/vr/vr_display_impl.cc

Issue 2738683002: WebVR compositor bypass via BrowserMain context + mailbox (Closed)
Patch Set: Less hacked up version 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
« no previous file with comments | « device/vr/vr_display_impl.h ('k') | device/vr/vr_service.mojom » ('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 #include <utility> 5 #include <utility>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "device/vr/vr_device.h" 8 #include "device/vr/vr_device.h"
9 #include "device/vr/vr_service_impl.h" 9 #include "device/vr/vr_service_impl.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 device_->SetSecureOrigin(secure_origin); 60 device_->SetSecureOrigin(secure_origin);
61 } 61 }
62 callback.Run(success); 62 callback.Run(success);
63 } 63 }
64 64
65 void VRDisplayImpl::ExitPresent() { 65 void VRDisplayImpl::ExitPresent() {
66 if (device_->CheckPresentingDisplay(this)) 66 if (device_->CheckPresentingDisplay(this))
67 device_->ExitPresent(); 67 device_->ExitPresent();
68 } 68 }
69 69
70 void VRDisplayImpl::SubmitFrame(mojom::VRPosePtr pose) { 70 void VRDisplayImpl::SubmitFrame(int16_t frame_index,
71 const gpu::MailboxHolder& mailbox,
72 mojom::VRSubmitFrameClientPtr submit_client) {
71 if (!device_->CheckPresentingDisplay(this)) 73 if (!device_->CheckPresentingDisplay(this))
72 return; 74 return;
73 device_->SubmitFrame(std::move(pose)); 75 device_->SubmitFrame(frame_index, mailbox, std::move(submit_client));
74 } 76 }
75 77
76 void VRDisplayImpl::UpdateLayerBounds(int16_t frame_index, 78 void VRDisplayImpl::UpdateLayerBounds(int16_t frame_index,
77 mojom::VRLayerBoundsPtr left_bounds, 79 mojom::VRLayerBoundsPtr left_bounds,
78 mojom::VRLayerBoundsPtr right_bounds) { 80 mojom::VRLayerBoundsPtr right_bounds,
81 int16_t source_width,
82 int16_t source_height) {
79 if (!device_->IsAccessAllowed(this)) 83 if (!device_->IsAccessAllowed(this))
80 return; 84 return;
81 85
82 device_->UpdateLayerBounds(frame_index, std::move(left_bounds), 86 device_->UpdateLayerBounds(frame_index, std::move(left_bounds),
83 std::move(right_bounds)); 87 std::move(right_bounds), source_width,
88 source_height);
84 } 89 }
85 90
86 void VRDisplayImpl::GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) { 91 void VRDisplayImpl::GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) {
87 if (!device_->IsAccessAllowed(this)) { 92 if (!device_->IsAccessAllowed(this)) {
88 return; 93 return;
89 } 94 }
90 device_->GetVRVSyncProvider(std::move(request)); 95 device_->GetVRVSyncProvider(std::move(request));
91 } 96 }
92 } 97 }
OLDNEW
« no previous file with comments | « device/vr/vr_display_impl.h ('k') | device/vr/vr_service.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698