Bug 1306429 - Remove VRPose.timestamp draft
authorKearwood (Kip) Gilbert <kgilbert@mozilla.com>
Thu, 29 Sep 2016 13:28:02 -0700
changeset 419181 af52432e6bd60abff0e44962952728a0fee1f05c
parent 419033 9baec74b3db1bf005c66ae2f50bafbdb02c3be38
child 532522 3bcddf423974f6b6cf7e310671ba9e7083b32ece
push id30874
push userkgilbert@mozilla.com
push dateThu, 29 Sep 2016 21:30:40 +0000
bugs1306429
milestone52.0a1
Bug 1306429 - Remove VRPose.timestamp - VRPose.timestamp has been removed with WebVR 1.1 - Has been replaced with VRFrameData.timestamp MozReview-Commit-ID: BpCVTLzkYWA
dom/vr/VRDisplay.cpp
dom/vr/VRDisplay.h
dom/webidl/VRDisplay.webidl
--- a/dom/vr/VRDisplay.cpp
+++ b/dom/vr/VRDisplay.cpp
@@ -294,17 +294,16 @@ VRPose::VRPose(nsISupports* aParent, con
   , mVRState(aState)
   , mPosition(nullptr)
   , mLinearVelocity(nullptr)
   , mLinearAcceleration(nullptr)
   , mOrientation(nullptr)
   , mAngularVelocity(nullptr)
   , mAngularAcceleration(nullptr)
 {
-  mTimeStamp = aState.timestamp * 1000.0f; // Converting from seconds to ms
   mFrameId = aState.inputFrameID;
   mozilla::HoldJSObjects(this);
 }
 
 VRPose::~VRPose()
 {
   mozilla::DropJSObjects(this);
 }
--- a/dom/vr/VRDisplay.h
+++ b/dom/vr/VRDisplay.h
@@ -99,17 +99,16 @@ class VRPose final : public nsWrapperCac
 {
 
 public:
   VRPose(nsISupports* aParent, const gfx::VRHMDSensorState& aState);
 
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(VRPose)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(VRPose)
 
-  double Timestamp() const { return mTimeStamp; }
   uint32_t FrameID() const { return mFrameId; }
 
   void GetPosition(JSContext* aCx,
                    JS::MutableHandle<JSObject*> aRetval,
                    ErrorResult& aRv);
   void GetLinearVelocity(JSContext* aCx,
                          JS::MutableHandle<JSObject*> aRetval,
                          ErrorResult& aRv);
@@ -128,17 +127,16 @@ public:
 
   nsISupports* GetParentObject() const { return mParent; }
   virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
 protected:
   ~VRPose();
   nsCOMPtr<nsISupports> mParent;
 
-  double mTimeStamp;
   uint32_t mFrameId;
   gfx::VRHMDSensorState mVRState;
 
   JS::Heap<JSObject*> mPosition;
   JS::Heap<JSObject*> mLinearVelocity;
   JS::Heap<JSObject*> mLinearAcceleration;
   JS::Heap<JSObject*> mOrientation;
   JS::Heap<JSObject*> mAngularVelocity;
--- a/dom/webidl/VRDisplay.webidl
+++ b/dom/webidl/VRDisplay.webidl
@@ -112,18 +112,16 @@ interface VRStageParameters {
    */
   readonly attribute float sizeX;
   readonly attribute float sizeZ;
 };
 
 [Pref="dom.vr.enabled",
  HeaderFile="mozilla/dom/VRDisplay.h"]
 interface VRPose {
-  readonly attribute DOMHighResTimeStamp timestamp;
-
   /**
    * position, linearVelocity, and linearAcceleration are 3-component vectors.
    * position is relative to a sitting space. Transforming this point with
    * VRStageParameters.sittingToStandingTransform converts this to standing space.
    */
   [Constant, Throws] readonly attribute Float32Array? position;
   [Constant, Throws] readonly attribute Float32Array? linearVelocity;
   [Constant, Throws] readonly attribute Float32Array? linearAcceleration;