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

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

Issue 2309523003: Plumbing through more WebVR presentation code (Closed)
Patch Set: Addressed Michael's feedack Created 4 years, 3 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_service_impl.h ('k') | third_party/WebKit/Source/modules/vr/VRController.h » ('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 "device/vr/vr_service_impl.h" 5 #include "device/vr/vr_service_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "device/vr/vr_device.h" 10 #include "device/vr/vr_device.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 } 59 }
60 60
61 void VRServiceImpl::ResetPose(uint32_t index) { 61 void VRServiceImpl::ResetPose(uint32_t index) {
62 VRDeviceManager* device_manager = VRDeviceManager::GetInstance(); 62 VRDeviceManager* device_manager = VRDeviceManager::GetInstance();
63 VRDevice* device = device_manager->GetDevice(index); 63 VRDevice* device = device_manager->GetDevice(index);
64 if (device) 64 if (device)
65 device->ResetPose(); 65 device->ResetPose();
66 } 66 }
67 67
68 void VRServiceImpl::RequestPresent(uint32_t index) {
69 VRDeviceManager* device_manager = VRDeviceManager::GetInstance();
70 VRDevice* device = device_manager->GetDevice(index);
71 if (device)
72 device->RequestPresent();
73 }
74
75 void VRServiceImpl::ExitPresent(uint32_t index) {
76 VRDeviceManager* device_manager = VRDeviceManager::GetInstance();
77 VRDevice* device = device_manager->GetDevice(index);
78 if (device)
79 device->ExitPresent();
80 }
81
82 void VRServiceImpl::SubmitFrame(uint32_t index) {
83 VRDeviceManager* device_manager = VRDeviceManager::GetInstance();
84 VRDevice* device = device_manager->GetDevice(index);
85 if (device)
86 device->SubmitFrame();
87 }
88
89 void VRServiceImpl::UpdateLayerBounds(uint32_t index,
90 VRLayerBoundsPtr leftBounds,
91 VRLayerBoundsPtr rightBounds) {
92 VRDeviceManager* device_manager = VRDeviceManager::GetInstance();
93 VRDevice* device = device_manager->GetDevice(index);
94 if (device)
95 device->UpdateLayerBounds(std::move(leftBounds), std::move(rightBounds));
96 }
97
68 } // namespace device 98 } // namespace device
OLDNEW
« no previous file with comments | « device/vr/vr_service_impl.h ('k') | third_party/WebKit/Source/modules/vr/VRController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698