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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 if (device_->CheckPresentingDisplay(this)) | 69 if (device_->CheckPresentingDisplay(this)) |
70 device_->ExitPresent(); | 70 device_->ExitPresent(); |
71 } | 71 } |
72 | 72 |
73 void VRDisplayImpl::SubmitFrame(mojom::VRPosePtr pose) { | 73 void VRDisplayImpl::SubmitFrame(mojom::VRPosePtr pose) { |
74 if (!device_->CheckPresentingDisplay(this)) | 74 if (!device_->CheckPresentingDisplay(this)) |
75 return; | 75 return; |
76 device_->SubmitFrame(std::move(pose)); | 76 device_->SubmitFrame(std::move(pose)); |
77 } | 77 } |
78 | 78 |
79 void VRDisplayImpl::UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds, | 79 void VRDisplayImpl::UpdateLayerBounds(uint32_t frame_index, |
| 80 mojom::VRLayerBoundsPtr left_bounds, |
80 mojom::VRLayerBoundsPtr right_bounds) { | 81 mojom::VRLayerBoundsPtr right_bounds) { |
81 if (!device_->IsAccessAllowed(this)) | 82 if (!device_->IsAccessAllowed(this)) |
82 return; | 83 return; |
83 | 84 |
84 device_->UpdateLayerBounds(std::move(left_bounds), std::move(right_bounds)); | 85 device_->UpdateLayerBounds(frame_index, std::move(left_bounds), |
| 86 std::move(right_bounds)); |
85 } | 87 } |
86 } | 88 } |
OLD | NEW |