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

Unified Diff: third_party/WebKit/Source/modules/vr/VRStageParameters.cpp

Issue 1967633002: Updated VRService to match the latest Blink WebVR interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed TypeConverter, back to local conversion function. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/vr/VRStageParameters.cpp
diff --git a/third_party/WebKit/Source/modules/vr/VRStageParameters.cpp b/third_party/WebKit/Source/modules/vr/VRStageParameters.cpp
index 09ea2fd7a2dea1aebe2e8a119b862e557b7dc39e..3725c3a040c1778f35a3dc01df11c8a2f290735f 100644
--- a/third_party/WebKit/Source/modules/vr/VRStageParameters.cpp
+++ b/third_party/WebKit/Source/modules/vr/VRStageParameters.cpp
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "modules/vr/VRStageParameters.h"
+#include "platform/mojo/MojoHelper.h"
dcheng 2016/05/19 22:17:48 Not needed now, I think.
namespace blink {
@@ -18,6 +19,15 @@ VRStageParameters::VRStageParameters()
m_standingTransform->data()[15] = 1.0f;
}
+void VRStageParameters::update(const mojom::blink::VRStageParametersPtr& stage)
+{
+ if (!stage->standingTransform.is_null() && stage->standingTransform.size() == 16) {
dcheng 2016/05/19 22:17:48 Ditto: will Mojo actually deserialize the message
+ m_standingTransform = DOMFloat32Array::create(&(stage->standingTransform.front()), 16);
+ }
+ m_sizeX = stage->sizeX;
+ m_sizeZ = stage->sizeZ;
+}
+
DEFINE_TRACE(VRStageParameters)
{
visitor->trace(m_standingTransform);

Powered by Google App Engine
This is Rietveld 408576698