| 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 #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 Loading... |
| 60 if (device_->CheckPresentingDisplay(this)) | 60 if (device_->CheckPresentingDisplay(this)) |
| 61 device_->ExitPresent(); | 61 device_->ExitPresent(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void VRDisplayImpl::SubmitFrame(mojom::VRPosePtr pose) { | 64 void VRDisplayImpl::SubmitFrame(mojom::VRPosePtr pose) { |
| 65 if (!device_->CheckPresentingDisplay(this)) | 65 if (!device_->CheckPresentingDisplay(this)) |
| 66 return; | 66 return; |
| 67 device_->SubmitFrame(std::move(pose)); | 67 device_->SubmitFrame(std::move(pose)); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void VRDisplayImpl::UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds, | 70 void VRDisplayImpl::UpdateLayerBounds(int16_t frame_index, |
| 71 mojom::VRLayerBoundsPtr left_bounds, |
| 71 mojom::VRLayerBoundsPtr right_bounds) { | 72 mojom::VRLayerBoundsPtr right_bounds) { |
| 72 if (!device_->IsAccessAllowed(this)) | 73 if (!device_->IsAccessAllowed(this)) |
| 73 return; | 74 return; |
| 74 | 75 |
| 75 device_->UpdateLayerBounds(std::move(left_bounds), std::move(right_bounds)); | 76 device_->UpdateLayerBounds(frame_index, std::move(left_bounds), |
| 77 std::move(right_bounds)); |
| 76 } | 78 } |
| 77 | 79 |
| 78 void VRDisplayImpl::GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) { | 80 void VRDisplayImpl::GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) { |
| 79 if (!device_->IsAccessAllowed(this)) { | 81 if (!device_->IsAccessAllowed(this)) { |
| 80 return; | 82 return; |
| 81 } | 83 } |
| 82 device_->GetVRVSyncProvider(std::move(request)); | 84 device_->GetVRVSyncProvider(std::move(request)); |
| 83 } | 85 } |
| 84 } | 86 } |
| OLD | NEW |