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

Side by Side Diff: third_party/WebKit/Source/modules/vr/VRFrameData.cpp

Issue 2488273002: Revert of mojo VR interface simplified (Closed)
Patch Set: Created 4 years, 1 month 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 #include "modules/vr/VRFrameData.h" 5 #include "modules/vr/VRFrameData.h"
6 6
7 #include "modules/vr/VREyeParameters.h" 7 #include "modules/vr/VREyeParameters.h"
8 #include "modules/vr/VRPose.h" 8 #include "modules/vr/VRPose.h"
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 }; 167 };
168 168
169 VRFrameData::VRFrameData() : m_timestamp(0.0) { 169 VRFrameData::VRFrameData() : m_timestamp(0.0) {
170 m_leftProjectionMatrix = DOMFloat32Array::create(16); 170 m_leftProjectionMatrix = DOMFloat32Array::create(16);
171 m_leftViewMatrix = DOMFloat32Array::create(16); 171 m_leftViewMatrix = DOMFloat32Array::create(16);
172 m_rightProjectionMatrix = DOMFloat32Array::create(16); 172 m_rightProjectionMatrix = DOMFloat32Array::create(16);
173 m_rightViewMatrix = DOMFloat32Array::create(16); 173 m_rightViewMatrix = DOMFloat32Array::create(16);
174 m_pose = VRPose::create(); 174 m_pose = VRPose::create();
175 } 175 }
176 176
177 bool VRFrameData::update(const device::mojom::blink::VRPosePtr& pose, 177 bool VRFrameData::update(const device::blink::VRPosePtr& pose,
178 VREyeParameters* leftEye, 178 VREyeParameters* leftEye,
179 VREyeParameters* rightEye, 179 VREyeParameters* rightEye,
180 float depthNear, 180 float depthNear,
181 float depthFar) { 181 float depthFar) {
182 if (!pose) 182 if (!pose)
183 return false; 183 return false;
184 184
185 m_timestamp = pose->timestamp; 185 m_timestamp = pose->timestamp;
186 186
187 // Build the projection matrices 187 // Build the projection matrices
(...skipping 23 matching lines...) Expand all
211 211
212 DEFINE_TRACE(VRFrameData) { 212 DEFINE_TRACE(VRFrameData) {
213 visitor->trace(m_leftProjectionMatrix); 213 visitor->trace(m_leftProjectionMatrix);
214 visitor->trace(m_leftViewMatrix); 214 visitor->trace(m_leftViewMatrix);
215 visitor->trace(m_rightProjectionMatrix); 215 visitor->trace(m_rightProjectionMatrix);
216 visitor->trace(m_rightViewMatrix); 216 visitor->trace(m_rightViewMatrix);
217 visitor->trace(m_pose); 217 visitor->trace(m_pose);
218 } 218 }
219 219
220 } // namespace blink 220 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRFrameData.h ('k') | third_party/WebKit/Source/modules/vr/VRPose.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698