Bug 1306429 - Remove VRPose.timestamp
- VRPose.timestamp has been removed with WebVR 1.1
- Has been replaced with VRFrameData.timestamp
MozReview-Commit-ID: BpCVTLzkYWA
--- 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;