Bug 1474034 - Use consistent prefixes for POD struct members in gfx/vr/external_api/moz_external_vr.h r=kip
authorthomasmo <thomasmo@mozilla.com>
Wed, 09 Jan 2019 21:57:36 +0000
changeset 510252 68dc096dab039ddc824d285c6511b033abd2b6c3
parent 510251 d4320750e1bf2cb20020d9b4461b9279098d79fc
child 510253 5c70351492dab61461ac07609bfb75ca7da405b0
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskip
bugs1474034
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1474034 - Use consistent prefixes for POD struct members in gfx/vr/external_api/moz_external_vr.h r=kip This change updates the structs VRDisplayState, VRLayer_2D_Content, and VRLayer_Stereo_Immersive to not have 'm' prefix for its members. Differential Revision: https://phabricator.services.mozilla.com/D16000
dom/vr/VRDisplay.cpp
dom/vr/VRServiceTest.cpp
dom/vr/VRServiceTest.h
gfx/vr/VRDisplayClient.cpp
gfx/vr/VRDisplayHost.cpp
gfx/vr/external_api/moz_external_vr.h
gfx/vr/gfxVR.cpp
gfx/vr/gfxVR.h
gfx/vr/gfxVRExternal.cpp
gfx/vr/gfxVRPuppet.cpp
gfx/vr/ipc/VRLayerChild.cpp
gfx/vr/ipc/VRMessageUtils.h
gfx/vr/service/OSVRSession.cpp
gfx/vr/service/OculusSession.cpp
gfx/vr/service/OpenVRSession.cpp
gfx/vr/service/VRService.cpp
gfx/vr/service/VRSession.cpp
--- a/dom/vr/VRDisplay.cpp
+++ b/dom/vr/VRDisplay.cpp
@@ -797,21 +797,21 @@ void VRFrameInfo::Update(const gfx::VRDi
 
   // Avoid division by zero within ConstructProjectionMatrix
   const float kEpsilon = 0.00001f;
   if (fabs(aDepthFar - aDepthNear) < kEpsilon) {
     aDepthFar = aDepthNear + kEpsilon;
   }
 
   const gfx::VRFieldOfView leftFOV =
-      aInfo.mDisplayState.mEyeFOV[gfx::VRDisplayState::Eye_Left];
+      aInfo.mDisplayState.eyeFOV[gfx::VRDisplayState::Eye_Left];
   mLeftProjection =
       leftFOV.ConstructProjectionMatrix(aDepthNear, aDepthFar, true);
   const gfx::VRFieldOfView rightFOV =
-      aInfo.mDisplayState.mEyeFOV[gfx::VRDisplayState::Eye_Right];
+      aInfo.mDisplayState.eyeFOV[gfx::VRDisplayState::Eye_Right];
   mRightProjection =
       rightFOV.ConstructProjectionMatrix(aDepthNear, aDepthFar, true);
   memcpy(mLeftView.components, aState.leftViewMatrix,
          sizeof(aState.leftViewMatrix));
   memcpy(mRightView.components, aState.rightViewMatrix,
          sizeof(aState.rightViewMatrix));
 }
 
--- a/dom/vr/VRServiceTest.cpp
+++ b/dom/vr/VRServiceTest.cpp
@@ -27,52 +27,52 @@ NS_IMPL_ADDREF_INHERITED(VRMockDisplay, 
 NS_IMPL_RELEASE_INHERITED(VRMockDisplay, DOMEventTargetHelper)
 
 VRMockDisplay::VRMockDisplay(const nsCString& aID, uint32_t aDeviceID)
     : mDeviceID(aDeviceID),
       mDisplayInfo{},
       mSensorState{},
       mTimestamp(TimeStamp::Now()) {
   VRDisplayState& state = mDisplayInfo.mDisplayState;
-  strncpy(state.mDisplayName, aID.BeginReading(), kVRDisplayNameMaxLen);
+  strncpy(state.displayName, aID.BeginReading(), kVRDisplayNameMaxLen);
   mDisplayInfo.mType = VRDeviceType::Puppet;
-  state.mIsConnected = true;
-  state.mIsMounted = false;
-  state.mCapabilityFlags = VRDisplayCapabilityFlags::Cap_None |
-                           VRDisplayCapabilityFlags::Cap_Orientation |
-                           VRDisplayCapabilityFlags::Cap_AngularAcceleration |
-                           VRDisplayCapabilityFlags::Cap_Position |
-                           VRDisplayCapabilityFlags::Cap_LinearAcceleration |
-                           VRDisplayCapabilityFlags::Cap_External |
-                           VRDisplayCapabilityFlags::Cap_Present |
-                           VRDisplayCapabilityFlags::Cap_StageParameters |
-                           VRDisplayCapabilityFlags::Cap_MountDetection;
+  state.isConnected = true;
+  state.isMounted = false;
+  state.capabilityFlags = VRDisplayCapabilityFlags::Cap_None |
+                          VRDisplayCapabilityFlags::Cap_Orientation |
+                          VRDisplayCapabilityFlags::Cap_AngularAcceleration |
+                          VRDisplayCapabilityFlags::Cap_Position |
+                          VRDisplayCapabilityFlags::Cap_LinearAcceleration |
+                          VRDisplayCapabilityFlags::Cap_External |
+                          VRDisplayCapabilityFlags::Cap_Present |
+                          VRDisplayCapabilityFlags::Cap_StageParameters |
+                          VRDisplayCapabilityFlags::Cap_MountDetection;
 }
 
 JSObject* VRMockDisplay::WrapObject(JSContext* aCx,
                                     JS::Handle<JSObject*> aGivenProto) {
   return VRMockDisplay_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 void VRMockDisplay::SetEyeResolution(unsigned long aRenderWidth,
                                      unsigned long aRenderHeight) {
-  mDisplayInfo.mDisplayState.mEyeResolution.width = aRenderWidth;
-  mDisplayInfo.mDisplayState.mEyeResolution.height = aRenderHeight;
+  mDisplayInfo.mDisplayState.eyeResolution.width = aRenderWidth;
+  mDisplayInfo.mDisplayState.eyeResolution.height = aRenderHeight;
 }
 
 void VRMockDisplay::SetEyeParameter(VREye aEye, double aOffsetX,
                                     double aOffsetY, double aOffsetZ,
                                     double aUpDegree, double aRightDegree,
                                     double aDownDegree, double aLeftDegree) {
   uint32_t eye = static_cast<uint32_t>(aEye);
-  mDisplayInfo.mDisplayState.mEyeFOV[eye] =
+  mDisplayInfo.mDisplayState.eyeFOV[eye] =
       gfx ::VRFieldOfView(aUpDegree, aRightDegree, aRightDegree, aLeftDegree);
-  mDisplayInfo.mDisplayState.mEyeTranslation[eye].x = aOffsetX;
-  mDisplayInfo.mDisplayState.mEyeTranslation[eye].y = aOffsetY;
-  mDisplayInfo.mDisplayState.mEyeTranslation[eye].z = aOffsetZ;
+  mDisplayInfo.mDisplayState.eyeTranslation[eye].x = aOffsetX;
+  mDisplayInfo.mDisplayState.eyeTranslation[eye].y = aOffsetY;
+  mDisplayInfo.mDisplayState.eyeTranslation[eye].z = aOffsetZ;
 }
 
 void VRMockDisplay::SetPose(
     const Nullable<Float32Array>& aPosition,
     const Nullable<Float32Array>& aLinearVelocity,
     const Nullable<Float32Array>& aLinearAcceleration,
     const Nullable<Float32Array>& aOrientation,
     const Nullable<Float32Array>& aAngularVelocity,
--- a/dom/vr/VRServiceTest.h
+++ b/dom/vr/VRServiceTest.h
@@ -28,17 +28,17 @@ class VRMockDisplay final : public DOMEv
                         unsigned long aRenderHeight);
   void SetPose(const Nullable<Float32Array>& aPosition,
                const Nullable<Float32Array>& aLinearVelocity,
                const Nullable<Float32Array>& aLinearAcceleration,
                const Nullable<Float32Array>& aOrientation,
                const Nullable<Float32Array>& aAngularVelocity,
                const Nullable<Float32Array>& aAngularAcceleration);
   void SetMountState(bool aIsMounted) {
-    mDisplayInfo.mDisplayState.mIsMounted = aIsMounted;
+    mDisplayInfo.mDisplayState.isMounted = aIsMounted;
   }
   void Update();
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
  private:
   ~VRMockDisplay() = default;
 
--- a/gfx/vr/VRDisplayClient.cpp
+++ b/gfx/vr/VRDisplayClient.cpp
@@ -66,58 +66,57 @@ void VRDisplayClient::ZeroSensor() {
 
 void VRDisplayClient::SetGroupMask(uint32_t aGroupMask) {
   VRManagerChild* vm = VRManagerChild::Get();
   vm->SendSetGroupMask(mDisplayInfo.mDisplayID, aGroupMask);
 }
 
 bool VRDisplayClient::IsPresentationGenerationCurrent() const {
   if (mLastPresentingGeneration !=
-      mDisplayInfo.mDisplayState.mPresentingGeneration) {
+      mDisplayInfo.mDisplayState.presentingGeneration) {
     return false;
   }
 
   return true;
 }
 
 void VRDisplayClient::MakePresentationGenerationCurrent() {
-  mLastPresentingGeneration = mDisplayInfo.mDisplayState.mPresentingGeneration;
+  mLastPresentingGeneration = mDisplayInfo.mDisplayState.presentingGeneration;
 }
 
 void VRDisplayClient::FireEvents() {
   VRManagerChild* vm = VRManagerChild::Get();
   // Only fire these events for non-chrome VR sessions
   bool isPresenting = (mDisplayInfo.mPresentingGroups & kVRGroupContent) != 0;
 
   // Check if we need to trigger onVRDisplayPresentChange event
   if (bLastEventWasPresenting != isPresenting) {
     bLastEventWasPresenting = isPresenting;
     vm->FireDOMVRDisplayPresentChangeEvent(mDisplayInfo.mDisplayID);
   }
 
   // Check if we need to trigger onvrdisplayactivate event
-  if (!bLastEventWasMounted && mDisplayInfo.mDisplayState.mIsMounted) {
+  if (!bLastEventWasMounted && mDisplayInfo.mDisplayState.isMounted) {
     bLastEventWasMounted = true;
     if (gfxPrefs::VRAutoActivateEnabled()) {
       vm->FireDOMVRDisplayMountedEvent(mDisplayInfo.mDisplayID);
     }
   }
 
   // Check if we need to trigger onvrdisplaydeactivate event
-  if (bLastEventWasMounted && !mDisplayInfo.mDisplayState.mIsMounted) {
+  if (bLastEventWasMounted && !mDisplayInfo.mDisplayState.isMounted) {
     bLastEventWasMounted = false;
     if (gfxPrefs::VRAutoActivateEnabled()) {
       vm->FireDOMVRDisplayUnmountedEvent(mDisplayInfo.mDisplayID);
     }
   }
 
   if (mLastPresentingGeneration !=
-      mDisplayInfo.mDisplayState.mPresentingGeneration) {
-    mLastPresentingGeneration =
-        mDisplayInfo.mDisplayState.mPresentingGeneration;
+      mDisplayInfo.mDisplayState.presentingGeneration) {
+    mLastPresentingGeneration = mDisplayInfo.mDisplayState.presentingGeneration;
     vm->NotifyPresentationGenerationChanged(mDisplayInfo.mDisplayID);
   }
 
   // Check if we need to trigger VRDisplay.requestAnimationFrame
   if (mLastEventFrameId != mDisplayInfo.mFrameId) {
     mLastEventFrameId = mDisplayInfo.mFrameId;
     vm->RunFrameRequestCallbacks();
   }
@@ -271,17 +270,17 @@ const VRHMDSensorState& VRDisplayClient:
   return mDisplayInfo.GetSensorState();
 }
 
 bool VRDisplayClient::GetIsConnected() const {
   return mDisplayInfo.GetIsConnected();
 }
 
 void VRDisplayClient::NotifyDisconnected() {
-  mDisplayInfo.mDisplayState.mIsConnected = false;
+  mDisplayInfo.mDisplayState.isConnected = false;
 }
 
 void VRDisplayClient::UpdateSubmitFrameResult(
     const VRSubmitFrameResultInfo& aResult) {
   mSubmitFrameResult = aResult;
 }
 
 void VRDisplayClient::GetSubmitFrameResult(VRSubmitFrameResultInfo& aResult) {
--- a/gfx/vr/VRDisplayHost.cpp
+++ b/gfx/vr/VRDisplayHost.cpp
@@ -68,18 +68,18 @@ bool VRDisplayHost::AutoRestoreRenderSta
 VRDisplayHost::VRDisplayHost(VRDeviceType aType)
     : mDisplayInfo{}, mLastUpdateDisplayInfo{}, mFrameStarted(false) {
   MOZ_COUNT_CTOR(VRDisplayHost);
   mDisplayInfo.mType = aType;
   mDisplayInfo.mDisplayID = VRSystemManager::AllocateDisplayID();
   mDisplayInfo.mPresentingGroups = 0;
   mDisplayInfo.mGroupMask = kVRGroupContent;
   mDisplayInfo.mFrameId = 0;
-  mDisplayInfo.mDisplayState.mPresentingGeneration = 0;
-  mDisplayInfo.mDisplayState.mDisplayName[0] = '\0';
+  mDisplayInfo.mDisplayState.presentingGeneration = 0;
+  mDisplayInfo.mDisplayState.displayName[0] = '\0';
 
 #if defined(MOZ_WIDGET_ANDROID)
   mLastSubmittedFrameId = 0;
   mLastStartedFrame = 0;
 #endif  // defined(MOZ_WIDGET_ANDROID)
 }
 
 VRDisplayHost::~VRDisplayHost() {
@@ -139,17 +139,17 @@ ID3DDeviceContextState* VRDisplayHost::G
 
 #endif  // defined(XP_WIN)
 
 void VRDisplayHost::SetGroupMask(uint32_t aGroupMask) {
   mDisplayInfo.mGroupMask = aGroupMask;
 }
 
 bool VRDisplayHost::GetIsConnected() {
-  return mDisplayInfo.mDisplayState.mIsConnected;
+  return mDisplayInfo.mDisplayState.isConnected;
 }
 
 void VRDisplayHost::AddLayer(VRLayerParent* aLayer) {
   mLayers.AppendElement(aLayer);
   mDisplayInfo.mPresentingGroups |= aLayer->GetGroup();
   if (mLayers.Length() == 1) {
     StartPresentation();
   }
@@ -184,17 +184,17 @@ void VRDisplayHost::StartFrame() {
   const bool isPresenting = mLastUpdateDisplayInfo.GetPresentingGroups() != 0;
   double duration =
       lastFrameStart.IsNull() ? 0.0 : (now - lastFrameStart).ToMilliseconds();
   /**
    * Do not start more VR frames until the last submitted frame is already
    * processed.
    */
   if (isPresenting && mLastStartedFrame > 0 &&
-      mDisplayInfo.mDisplayState.mLastSubmittedFrameId < mLastStartedFrame &&
+      mDisplayInfo.mDisplayState.lastSubmittedFrameId < mLastStartedFrame &&
       duration < (double)ANDROID_MAX_FRAME_DURATION) {
     return;
   }
 #endif  // !defined(MOZ_WIDGET_ANDROID)
 
   ++mDisplayInfo.mFrameId;
   size_t bufferIndex = mDisplayInfo.mFrameId % kVRMaxLatencyFrames;
   mDisplayInfo.mLastSensorState[bufferIndex] = GetSensorState();
@@ -327,17 +327,17 @@ void VRDisplayHost::SubmitFrame(VRLayerP
 
 #if defined(MOZ_WIDGET_ANDROID)
   /**
    * Do not queue more submit frames until the last submitted frame is already
    * processed and the new WebGL texture is ready.
    */
   if (mLastSubmittedFrameId > 0 &&
       mLastSubmittedFrameId !=
-          mDisplayInfo.mDisplayState.mLastSubmittedFrameId) {
+          mDisplayInfo.mDisplayState.lastSubmittedFrameId) {
     mLastStartedFrame = 0;
     return;
   }
 
   mLastSubmittedFrameId = aFrameId;
 #endif  // !defined(MOZ_WIDGET_ANDROID)
 
   mFrameStarted = false;
--- a/gfx/vr/external_api/moz_external_vr.h
+++ b/gfx/vr/external_api/moz_external_vr.h
@@ -250,39 +250,39 @@ struct VRFieldOfView {
 
 struct VRDisplayState {
   enum Eye { Eye_Left, Eye_Right, NumEyes };
 
   // When true, indicates that the VR service has shut down
   bool shutdown;
   // Minimum number of milliseconds to wait before attempting
   // to start the VR service again
-  uint32_t mMinRestartInterval;
-  char mDisplayName[kVRDisplayNameMaxLen];
+  uint32_t minRestartInterval;
+  char displayName[kVRDisplayNameMaxLen];
   // eight byte character code identifier
   // LSB first, so "ABCDEFGH" -> ('H'<<56) + ('G'<<48) + ('F'<<40) +
   //                             ('E'<<32) + ('D'<<24) + ('C'<<16) +
   //                             ('B'<<8) + 'A').
-  uint64_t mEightCC;
-  VRDisplayCapabilityFlags mCapabilityFlags;
-  VRFieldOfView mEyeFOV[VRDisplayState::NumEyes];
-  Point3D_POD mEyeTranslation[VRDisplayState::NumEyes];
-  IntSize_POD mEyeResolution;
-  bool mSuppressFrames;
-  bool mIsConnected;
-  bool mIsMounted;
-  FloatSize_POD mStageSize;
+  uint64_t eightCC;
+  VRDisplayCapabilityFlags capabilityFlags;
+  VRFieldOfView eyeFOV[VRDisplayState::NumEyes];
+  Point3D_POD eyeTranslation[VRDisplayState::NumEyes];
+  IntSize_POD eyeResolution;
+  bool suppressFrames;
+  bool isConnected;
+  bool isMounted;
+  FloatSize_POD stageSize;
   // We can't use a Matrix4x4 here unless we ensure it's a POD type
-  float mSittingToStandingTransform[16];
-  uint64_t mLastSubmittedFrameId;
-  bool mLastSubmittedFrameSuccessful;
-  uint32_t mPresentingGeneration;
+  float sittingToStandingTransform[16];
+  uint64_t lastSubmittedFrameId;
+  bool lastSubmittedFrameSuccessful;
+  uint32_t presentingGeneration;
   // Telemetry
-  bool mReportsDroppedFrames;
-  uint64_t mDroppedFrameCount;
+  bool reportsDroppedFrames;
+  uint64_t droppedFrameCount;
 };
 
 struct VRControllerState {
   char controllerName[kVRControllerNameMaxLen];
 #ifdef MOZILLA_INTERNAL_API
   dom::GamepadHand hand;
 #else
   ControllerHand hand;
@@ -323,28 +323,28 @@ enum class VRLayerType : uint16_t {
 enum class VRLayerTextureType : uint16_t {
   LayerTextureType_None = 0,
   LayerTextureType_D3D10SurfaceDescriptor = 1,
   LayerTextureType_MacIOSurface = 2,
   LayerTextureType_GeckoSurfaceTexture = 3
 };
 
 struct VRLayer_2D_Content {
-  VRLayerTextureHandle mTextureHandle;
-  VRLayerTextureType mTextureType;
-  uint64_t mFrameId;
+  VRLayerTextureHandle textureHandle;
+  VRLayerTextureType textureType;
+  uint64_t frameId;
 };
 
 struct VRLayer_Stereo_Immersive {
-  VRLayerTextureHandle mTextureHandle;
-  VRLayerTextureType mTextureType;
-  uint64_t mFrameId;
-  uint64_t mInputFrameId;
-  VRLayerEyeRect mLeftEyeRect;
-  VRLayerEyeRect mRightEyeRect;
+  VRLayerTextureHandle textureHandle;
+  VRLayerTextureType textureType;
+  uint64_t frameId;
+  uint64_t inputFrameId;
+  VRLayerEyeRect leftEyeRect;
+  VRLayerEyeRect rightEyeRect;
 };
 
 struct VRLayerState {
   VRLayerType type;
   union {
     VRLayer_2D_Content layer_2d_content;
     VRLayer_Stereo_Immersive layer_stereo_immersive;
   };
--- a/gfx/vr/gfxVR.cpp
+++ b/gfx/vr/gfxVR.cpp
@@ -185,30 +185,30 @@ void VRHMDSensorState::CalcViewMatrices(
   matView.Normalize();
   memcpy(leftViewMatrix, matView.components, sizeof(matView.components));
   matView = matHead * aHeadToEyeTransforms[VRDisplayState::Eye_Right];
   matView.Normalize();
   memcpy(rightViewMatrix, matView.components, sizeof(matView.components));
 }
 
 const IntSize VRDisplayInfo::SuggestedEyeResolution() const {
-  return IntSize(mDisplayState.mEyeResolution.width,
-                 mDisplayState.mEyeResolution.height);
+  return IntSize(mDisplayState.eyeResolution.width,
+                 mDisplayState.eyeResolution.height);
 }
 
 const Point3D VRDisplayInfo::GetEyeTranslation(uint32_t whichEye) const {
-  return Point3D(mDisplayState.mEyeTranslation[whichEye].x,
-                 mDisplayState.mEyeTranslation[whichEye].y,
-                 mDisplayState.mEyeTranslation[whichEye].z);
+  return Point3D(mDisplayState.eyeTranslation[whichEye].x,
+                 mDisplayState.eyeTranslation[whichEye].y,
+                 mDisplayState.eyeTranslation[whichEye].z);
 }
 
 const Size VRDisplayInfo::GetStageSize() const {
-  return Size(mDisplayState.mStageSize.width, mDisplayState.mStageSize.height);
+  return Size(mDisplayState.stageSize.width, mDisplayState.stageSize.height);
 }
 
 const Matrix4x4 VRDisplayInfo::GetSittingToStandingTransform() const {
   Matrix4x4 m;
   // If we could replace Matrix4x4 with a pod type, we could
   // use it directly from the VRDisplayInfo struct.
-  memcpy(m.components, mDisplayState.mSittingToStandingTransform,
+  memcpy(m.components, mDisplayState.sittingToStandingTransform,
          sizeof(float) * 16);
   return m;
 }
--- a/gfx/vr/gfxVR.h
+++ b/gfx/vr/gfxVR.h
@@ -71,28 +71,28 @@ struct VRDisplayInfo {
   VRHMDSensorState mLastSensorState[kVRMaxLatencyFrames];
   TimeStamp mLastFrameStart[kVRMaxLatencyFrames];
   const VRHMDSensorState& GetSensorState() const {
     return mLastSensorState[mFrameId % kVRMaxLatencyFrames];
   }
 
   VRDeviceType GetType() const { return mType; }
   uint32_t GetDisplayID() const { return mDisplayID; }
-  const char* GetDisplayName() const { return mDisplayState.mDisplayName; }
+  const char* GetDisplayName() const { return mDisplayState.displayName; }
   VRDisplayCapabilityFlags GetCapabilities() const {
-    return mDisplayState.mCapabilityFlags;
+    return mDisplayState.capabilityFlags;
   }
 
   const IntSize SuggestedEyeResolution() const;
   const Point3D GetEyeTranslation(uint32_t whichEye) const;
   const VRFieldOfView& GetEyeFOV(uint32_t whichEye) const {
-    return mDisplayState.mEyeFOV[whichEye];
+    return mDisplayState.eyeFOV[whichEye];
   }
-  bool GetIsConnected() const { return mDisplayState.mIsConnected; }
-  bool GetIsMounted() const { return mDisplayState.mIsMounted; }
+  bool GetIsConnected() const { return mDisplayState.isConnected; }
+  bool GetIsMounted() const { return mDisplayState.isMounted; }
   uint32_t GetPresentingGroups() const { return mPresentingGroups; }
   uint32_t GetGroupMask() const { return mGroupMask; }
   const Size GetStageSize() const;
   const Matrix4x4 GetSittingToStandingTransform() const;
   uint64_t GetFrameId() const { return mFrameId; }
 
   bool operator==(const VRDisplayInfo& other) const {
     for (size_t i = 0; i < kVRMaxLatencyFrames; i++) {
--- a/gfx/vr/gfxVRExternal.cpp
+++ b/gfx/vr/gfxVRExternal.cpp
@@ -110,20 +110,20 @@ void VRDisplayExternal::StartPresentatio
   mTelemetry.Clear();
   mTelemetry.mPresentationStart = TimeStamp::Now();
 
   // Indicate that we are ready to start immersive mode
   mBrowserState.presentationActive = true;
   mBrowserState.layerState[0].type = VRLayerType::LayerType_Stereo_Immersive;
   PushState();
 
-  mDisplayInfo.mDisplayState.mLastSubmittedFrameId = 0;
-  if (mDisplayInfo.mDisplayState.mReportsDroppedFrames) {
+  mDisplayInfo.mDisplayState.lastSubmittedFrameId = 0;
+  if (mDisplayInfo.mDisplayState.reportsDroppedFrames) {
     mTelemetry.mLastDroppedFrameCount =
-        mDisplayInfo.mDisplayState.mDroppedFrameCount;
+        mDisplayInfo.mDisplayState.droppedFrameCount;
   }
 
 #if defined(MOZ_WIDGET_ANDROID)
   mLastSubmittedFrameId = 0;
   mLastStartedFrame = 0;
 #endif
 }
 
@@ -138,37 +138,37 @@ void VRDisplayExternal::StopPresentation
          sizeof(VRLayerState) * mozilla::ArrayLength(mBrowserState.layerState));
 
   PushState(true);
 
   Telemetry::HistogramID timeSpentID = Telemetry::HistogramCount;
   Telemetry::HistogramID droppedFramesID = Telemetry::HistogramCount;
   int viewIn = 0;
 
-  if (mDisplayInfo.mDisplayState.mEightCC ==
+  if (mDisplayInfo.mDisplayState.eightCC ==
       GFX_VR_EIGHTCC('O', 'c', 'u', 'l', 'u', 's', ' ', 'D')) {
     // Oculus Desktop API
     timeSpentID = Telemetry::WEBVR_TIME_SPENT_VIEWING_IN_OCULUS;
     droppedFramesID = Telemetry::WEBVR_DROPPED_FRAMES_IN_OCULUS;
     viewIn = 1;
-  } else if (mDisplayInfo.mDisplayState.mEightCC ==
+  } else if (mDisplayInfo.mDisplayState.eightCC ==
              GFX_VR_EIGHTCC('O', 'p', 'e', 'n', 'V', 'R', ' ', ' ')) {
     // OpenVR API
     timeSpentID = Telemetry::WEBVR_TIME_SPENT_VIEWING_IN_OPENVR;
     droppedFramesID = Telemetry::WEBVR_DROPPED_FRAMES_IN_OPENVR;
     viewIn = 2;
   }
 
   if (viewIn) {
     const TimeDuration duration =
         TimeStamp::Now() - mTelemetry.mPresentationStart;
     Telemetry::Accumulate(Telemetry::WEBVR_USERS_VIEW_IN, viewIn);
     Telemetry::Accumulate(timeSpentID, duration.ToMilliseconds());
     const uint32_t droppedFramesPerSec =
-        (mDisplayInfo.mDisplayState.mDroppedFrameCount -
+        (mDisplayInfo.mDisplayState.droppedFrameCount -
          mTelemetry.mLastDroppedFrameCount) /
         duration.ToSeconds();
     Telemetry::Accumulate(droppedFramesID, droppedFramesPerSec);
   }
 }
 
 void VRDisplayExternal::StartVRNavigation() {
   mBrowserState.navigationTransitionActive = true;
@@ -233,68 +233,68 @@ bool VRDisplayExternal::PopulateLayerTex
 bool VRDisplayExternal::SubmitFrame(const layers::SurfaceDescriptor& aTexture,
                                     uint64_t aFrameId,
                                     const gfx::Rect& aLeftEyeRect,
                                     const gfx::Rect& aRightEyeRect) {
   MOZ_ASSERT(mBrowserState.layerState[0].type ==
              VRLayerType::LayerType_Stereo_Immersive);
   VRLayer_Stereo_Immersive& layer =
       mBrowserState.layerState[0].layer_stereo_immersive;
-  if (!PopulateLayerTexture(aTexture, &layer.mTextureType,
-                            &layer.mTextureHandle)) {
+  if (!PopulateLayerTexture(aTexture, &layer.textureType,
+                            &layer.textureHandle)) {
     return false;
   }
-  layer.mFrameId = aFrameId;
-  layer.mInputFrameId =
+  layer.frameId = aFrameId;
+  layer.inputFrameId =
       mDisplayInfo.mLastSensorState[mDisplayInfo.mFrameId % kVRMaxLatencyFrames]
           .inputFrameID;
 
-  layer.mLeftEyeRect.x = aLeftEyeRect.x;
-  layer.mLeftEyeRect.y = aLeftEyeRect.y;
-  layer.mLeftEyeRect.width = aLeftEyeRect.width;
-  layer.mLeftEyeRect.height = aLeftEyeRect.height;
-  layer.mRightEyeRect.x = aRightEyeRect.x;
-  layer.mRightEyeRect.y = aRightEyeRect.y;
-  layer.mRightEyeRect.width = aRightEyeRect.width;
-  layer.mRightEyeRect.height = aRightEyeRect.height;
+  layer.leftEyeRect.x = aLeftEyeRect.x;
+  layer.leftEyeRect.y = aLeftEyeRect.y;
+  layer.leftEyeRect.width = aLeftEyeRect.width;
+  layer.leftEyeRect.height = aLeftEyeRect.height;
+  layer.rightEyeRect.x = aRightEyeRect.x;
+  layer.rightEyeRect.y = aRightEyeRect.y;
+  layer.rightEyeRect.width = aRightEyeRect.width;
+  layer.rightEyeRect.height = aRightEyeRect.height;
 
   PushState(true);
 
 #if defined(MOZ_WIDGET_ANDROID)
   PullState([&]() {
-    return (mDisplayInfo.mDisplayState.mLastSubmittedFrameId >= aFrameId) ||
-           mDisplayInfo.mDisplayState.mSuppressFrames ||
-           !mDisplayInfo.mDisplayState.mIsConnected;
+    return (mDisplayInfo.mDisplayState.lastSubmittedFrameId >= aFrameId) ||
+           mDisplayInfo.mDisplayState.suppressFrames ||
+           !mDisplayInfo.mDisplayState.isConnected;
   });
 
-  if (mDisplayInfo.mDisplayState.mSuppressFrames ||
-      !mDisplayInfo.mDisplayState.mIsConnected) {
+  if (mDisplayInfo.mDisplayState.suppressFrames ||
+      !mDisplayInfo.mDisplayState.isConnected) {
     // External implementation wants to supress frames, service has shut down or
     // hardware has been disconnected.
     return false;
   }
 #else
-  while (mDisplayInfo.mDisplayState.mLastSubmittedFrameId < aFrameId) {
+  while (mDisplayInfo.mDisplayState.lastSubmittedFrameId < aFrameId) {
     if (PullState()) {
-      if (mDisplayInfo.mDisplayState.mSuppressFrames ||
-          !mDisplayInfo.mDisplayState.mIsConnected) {
+      if (mDisplayInfo.mDisplayState.suppressFrames ||
+          !mDisplayInfo.mDisplayState.isConnected) {
         // External implementation wants to supress frames, service has shut
         // down or hardware has been disconnected.
         return false;
       }
     }
 #ifdef XP_WIN
     Sleep(0);
 #else
     sleep(0);
 #endif
   }
 #endif  // defined(MOZ_WIDGET_ANDROID)
 
-  return mDisplayInfo.mDisplayState.mLastSubmittedFrameSuccessful;
+  return mDisplayInfo.mDisplayState.lastSubmittedFrameSuccessful;
 }
 
 void VRDisplayExternal::VibrateHaptic(uint32_t aControllerIdx,
                                       uint32_t aHapticIndex, double aIntensity,
                                       double aDuration,
                                       const VRManagerPromise& aPromise) {
   TimeStamp now = TimeStamp::Now();
   size_t bestSlotIndex = 0;
@@ -631,17 +631,17 @@ void VRSystemManagerExternal::Enumerate(
 #ifdef XP_WIN
         Sleep(0);
 #else
         sleep(0);
 #endif  // XP_WIN
       }
 #endif  // defined(MOZ_WIDGET_ANDROID)
 
-      if (displayState.mIsConnected) {
+      if (displayState.isConnected) {
         mDisplay = new VRDisplayExternal(displayState);
       }
     }
   }
 }
 
 bool VRSystemManagerExternal::ShouldInhibitEnumeration() {
   if (VRSystemManager::ShouldInhibitEnumeration()) {
@@ -763,17 +763,17 @@ bool VRSystemManagerExternal::PullState(
         }
         mEnumerationCompleted = mExternalShmem->state.enumerationCompleted;
         if (aDisplayState->shutdown) {
           mDoShutdown = true;
           TimeStamp now = TimeStamp::Now();
           if (!mEarliestRestartTime.IsNull() && mEarliestRestartTime < now) {
             mEarliestRestartTime =
                 now + TimeDuration::FromMilliseconds(
-                          (double)aDisplayState->mMinRestartInterval);
+                          (double)aDisplayState->minRestartInterval);
           }
         }
         if (!aWaitCondition || aWaitCondition()) {
           done = true;
           break;
         }
         // Block current thead using the condition variable until data changes
         pthread_cond_wait((pthread_cond_t*)&mExternalShmem->systemCond,
@@ -811,17 +811,17 @@ bool VRSystemManagerExternal::PullState(
                sizeof(VRControllerState) * kVRControllerMaxCount);
       }
       if (aDisplayState->shutdown) {
         mDoShutdown = true;
         TimeStamp now = TimeStamp::Now();
         if (!mEarliestRestartTime.IsNull() && mEarliestRestartTime < now) {
           mEarliestRestartTime =
               now + TimeDuration::FromMilliseconds(
-                        (double)aDisplayState->mMinRestartInterval);
+                        (double)aDisplayState->minRestartInterval);
         }
       }
       success = true;
     }
   }
 
   return success;
 }
--- a/gfx/vr/gfxVRPuppet.cpp
+++ b/gfx/vr/gfxVRPuppet.cpp
@@ -50,60 +50,60 @@ static const uint32_t kNumPuppetHaptcs =
 
 VRDisplayPuppet::VRDisplayPuppet()
     : VRDisplayLocal(VRDeviceType::Puppet),
       mIsPresenting(false),
       mSensorState{} {
   MOZ_COUNT_CTOR_INHERITED(VRDisplayPuppet, VRDisplayLocal);
 
   VRDisplayState& state = mDisplayInfo.mDisplayState;
-  strncpy(state.mDisplayName, "Puppet HMD", kVRDisplayNameMaxLen);
-  state.mIsConnected = true;
-  state.mIsMounted = false;
-  state.mCapabilityFlags = VRDisplayCapabilityFlags::Cap_None |
-                           VRDisplayCapabilityFlags::Cap_Orientation |
-                           VRDisplayCapabilityFlags::Cap_Position |
-                           VRDisplayCapabilityFlags::Cap_External |
-                           VRDisplayCapabilityFlags::Cap_Present |
-                           VRDisplayCapabilityFlags::Cap_StageParameters;
-  state.mEyeResolution.width = 1836;   // 1080 * 1.7
-  state.mEyeResolution.height = 2040;  // 1200 * 1.7
+  strncpy(state.displayName, "Puppet HMD", kVRDisplayNameMaxLen);
+  state.isConnected = true;
+  state.isMounted = false;
+  state.capabilityFlags = VRDisplayCapabilityFlags::Cap_None |
+                          VRDisplayCapabilityFlags::Cap_Orientation |
+                          VRDisplayCapabilityFlags::Cap_Position |
+                          VRDisplayCapabilityFlags::Cap_External |
+                          VRDisplayCapabilityFlags::Cap_Present |
+                          VRDisplayCapabilityFlags::Cap_StageParameters;
+  state.eyeResolution.width = 1836;   // 1080 * 1.7
+  state.eyeResolution.height = 2040;  // 1200 * 1.7
 
   // SteamVR gives the application a single FOV to use; it's not configurable as
   // with Oculus
   for (uint32_t eye = 0; eye < 2; ++eye) {
-    state.mEyeTranslation[eye].x = 0.0f;
-    state.mEyeTranslation[eye].y = 0.0f;
-    state.mEyeTranslation[eye].z = 0.0f;
-    state.mEyeFOV[eye] = VRFieldOfView(45.0, 45.0, 45.0, 45.0);
+    state.eyeTranslation[eye].x = 0.0f;
+    state.eyeTranslation[eye].y = 0.0f;
+    state.eyeTranslation[eye].z = 0.0f;
+    state.eyeFOV[eye] = VRFieldOfView(45.0, 45.0, 45.0, 45.0);
   }
 
   // default: 1m x 1m space, 0.75m high in seated position
-  state.mStageSize.width = 1.0f;
-  state.mStageSize.height = 1.0f;
+  state.stageSize.width = 1.0f;
+  state.stageSize.height = 1.0f;
 
-  state.mSittingToStandingTransform[0] = 1.0f;
-  state.mSittingToStandingTransform[1] = 0.0f;
-  state.mSittingToStandingTransform[2] = 0.0f;
-  state.mSittingToStandingTransform[3] = 0.0f;
+  state.sittingToStandingTransform[0] = 1.0f;
+  state.sittingToStandingTransform[1] = 0.0f;
+  state.sittingToStandingTransform[2] = 0.0f;
+  state.sittingToStandingTransform[3] = 0.0f;
 
-  state.mSittingToStandingTransform[4] = 0.0f;
-  state.mSittingToStandingTransform[5] = 1.0f;
-  state.mSittingToStandingTransform[6] = 0.0f;
-  state.mSittingToStandingTransform[7] = 0.0f;
+  state.sittingToStandingTransform[4] = 0.0f;
+  state.sittingToStandingTransform[5] = 1.0f;
+  state.sittingToStandingTransform[6] = 0.0f;
+  state.sittingToStandingTransform[7] = 0.0f;
 
-  state.mSittingToStandingTransform[8] = 0.0f;
-  state.mSittingToStandingTransform[9] = 0.0f;
-  state.mSittingToStandingTransform[10] = 1.0f;
-  state.mSittingToStandingTransform[11] = 0.0f;
+  state.sittingToStandingTransform[8] = 0.0f;
+  state.sittingToStandingTransform[9] = 0.0f;
+  state.sittingToStandingTransform[10] = 1.0f;
+  state.sittingToStandingTransform[11] = 0.0f;
 
-  state.mSittingToStandingTransform[12] = 0.0f;
-  state.mSittingToStandingTransform[13] = 0.75f;
-  state.mSittingToStandingTransform[14] = 0.0f;
-  state.mSittingToStandingTransform[15] = 1.0f;
+  state.sittingToStandingTransform[12] = 0.0f;
+  state.sittingToStandingTransform[13] = 0.75f;
+  state.sittingToStandingTransform[14] = 0.0f;
+  state.sittingToStandingTransform[15] = 1.0f;
 
   gfx::Quaternion rot;
 
   mSensorState.flags |= VRDisplayCapabilityFlags::Cap_Orientation;
   mSensorState.pose.orientation[0] = rot.x;
   mSensorState.pose.orientation[1] = rot.y;
   mSensorState.pose.orientation[2] = rot.z;
   mSensorState.pose.orientation[3] = rot.w;
@@ -122,22 +122,22 @@ VRDisplayPuppet::VRDisplayPuppet()
 
 VRDisplayPuppet::~VRDisplayPuppet() {
   MOZ_COUNT_DTOR_INHERITED(VRDisplayPuppet, VRDisplayLocal);
 }
 
 void VRDisplayPuppet::SetDisplayInfo(const VRDisplayInfo& aDisplayInfo) {
   // We are only interested in the eye and mount info of the display info.
   VRDisplayState& state = mDisplayInfo.mDisplayState;
-  state.mEyeResolution = aDisplayInfo.mDisplayState.mEyeResolution;
-  state.mIsMounted = aDisplayInfo.mDisplayState.mIsMounted;
-  memcpy(&state.mEyeFOV, &aDisplayInfo.mDisplayState.mEyeFOV,
-         sizeof(state.mEyeFOV[0]) * VRDisplayState::NumEyes);
-  memcpy(&state.mEyeTranslation, &aDisplayInfo.mDisplayState.mEyeTranslation,
-         sizeof(state.mEyeTranslation[0]) * VRDisplayState::NumEyes);
+  state.eyeResolution = aDisplayInfo.mDisplayState.eyeResolution;
+  state.isMounted = aDisplayInfo.mDisplayState.isMounted;
+  memcpy(&state.eyeFOV, &aDisplayInfo.mDisplayState.eyeFOV,
+         sizeof(state.eyeFOV[0]) * VRDisplayState::NumEyes);
+  memcpy(&state.eyeTranslation, &aDisplayInfo.mDisplayState.eyeTranslation,
+         sizeof(state.eyeTranslation[0]) * VRDisplayState::NumEyes);
 }
 
 void VRDisplayPuppet::Destroy() { StopPresentation(); }
 
 void VRDisplayPuppet::ZeroSensor() {}
 
 VRHMDSensorState& VRDisplayPuppet::GetSensorState() {
   mSensorState.inputFrameID = mDisplayInfo.mFrameId;
@@ -547,17 +547,17 @@ bool VRDisplayPuppet::SubmitFrame(
   MOZ_ASSERT(mSubmitThread->GetThread() == NS_GetCurrentThread());
   return false;
 }
 
 #endif
 
 void VRDisplayPuppet::Refresh() {
   // We update mIsConneced once per refresh.
-  mDisplayInfo.mDisplayState.mIsConnected = true;
+  mDisplayInfo.mDisplayState.isConnected = true;
 }
 
 VRControllerPuppet::VRControllerPuppet(dom::GamepadHand aHand,
                                        uint32_t aDisplayID)
     : VRControllerHost(VRDeviceType::Puppet, aHand, aDisplayID),
       mButtonPressState(0),
       mButtonTouchState(0) {
   MOZ_COUNT_CTOR_INHERITED(VRControllerPuppet, VRControllerHost);
--- a/gfx/vr/ipc/VRLayerChild.cpp
+++ b/gfx/vr/ipc/VRLayerChild.cpp
@@ -56,17 +56,17 @@ void VRLayerChild::SubmitFrame(const VRD
 #if defined(MOZ_WIDGET_ANDROID)
   /**
    * Do not blit WebGL to a SurfaceTexture until the last submitted frame is
    * already processed and the new frame poses are ready. SurfaceTextures need
    * to be released in the VR render thread in order to allow to be used again
    * in the WebGLContext GLScreenBuffer producer. Not doing so causes some
    * freezes, crashes or other undefined behaviour.
    */
-  if (!mThisFrameTexture || aDisplayInfo.mDisplayState.mLastSubmittedFrameId ==
+  if (!mThisFrameTexture || aDisplayInfo.mDisplayState.lastSubmittedFrameId ==
                                 mLastSubmittedFrameId) {
     mThisFrameTexture = mCanvasElement->GetVRFrame();
   }
 #else
   mThisFrameTexture = mCanvasElement->GetVRFrame();
 #endif  // defined(MOZ_WIDGET_ANDROID)
 
   mLastSubmittedFrameId = frameId;
--- a/gfx/vr/ipc/VRMessageUtils.h
+++ b/gfx/vr/ipc/VRMessageUtils.h
@@ -41,70 +41,70 @@ struct ParamTraits<mozilla::gfx::VRDispl
   typedef mozilla::gfx::VRDisplayState paramType;
 
   static void Write(Message* aMsg, const paramType& aParam) {
     // TODO - VRDisplayState is asserted to be a POD type
     //        A simple memcpy may be sufficient here, or
     //        this code can be refactored out if we use
     //        shmem between the VR and content process.
     nsCString displayName;
-    displayName.Assign(aParam.mDisplayName);
+    displayName.Assign(aParam.displayName);
     WriteParam(aMsg, displayName);
-    WriteParam(aMsg, aParam.mCapabilityFlags);
-    WriteParam(aMsg, aParam.mEyeResolution.width);
-    WriteParam(aMsg, aParam.mEyeResolution.height);
-    WriteParam(aMsg, aParam.mSuppressFrames);
-    WriteParam(aMsg, aParam.mIsConnected);
-    WriteParam(aMsg, aParam.mIsMounted);
-    WriteParam(aMsg, aParam.mStageSize.width);
-    WriteParam(aMsg, aParam.mStageSize.height);
-    WriteParam(aMsg, aParam.mLastSubmittedFrameId);
-    WriteParam(aMsg, aParam.mPresentingGeneration);
+    WriteParam(aMsg, aParam.capabilityFlags);
+    WriteParam(aMsg, aParam.eyeResolution.width);
+    WriteParam(aMsg, aParam.eyeResolution.height);
+    WriteParam(aMsg, aParam.suppressFrames);
+    WriteParam(aMsg, aParam.isConnected);
+    WriteParam(aMsg, aParam.isMounted);
+    WriteParam(aMsg, aParam.stageSize.width);
+    WriteParam(aMsg, aParam.stageSize.height);
+    WriteParam(aMsg, aParam.lastSubmittedFrameId);
+    WriteParam(aMsg, aParam.presentingGeneration);
     for (int i = 0; i < 16; i++) {
       // TODO - Should probably memcpy the whole array or
       // convert Maxtrix4x4 to a POD type and use it
       // instead
-      WriteParam(aMsg, aParam.mSittingToStandingTransform[i]);
+      WriteParam(aMsg, aParam.sittingToStandingTransform[i]);
     }
     for (int i = 0; i < mozilla::gfx::VRDisplayState::NumEyes; i++) {
-      WriteParam(aMsg, aParam.mEyeFOV[i]);
-      WriteParam(aMsg, aParam.mEyeTranslation[i].x);
-      WriteParam(aMsg, aParam.mEyeTranslation[i].y);
-      WriteParam(aMsg, aParam.mEyeTranslation[i].z);
+      WriteParam(aMsg, aParam.eyeFOV[i]);
+      WriteParam(aMsg, aParam.eyeTranslation[i].x);
+      WriteParam(aMsg, aParam.eyeTranslation[i].y);
+      WriteParam(aMsg, aParam.eyeTranslation[i].z);
     }
   }
 
   static bool Read(const Message* aMsg, PickleIterator* aIter,
                    paramType* aResult) {
     nsCString displayName;
     if (!ReadParam(aMsg, aIter, &(displayName)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mCapabilityFlags)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mEyeResolution.width)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mEyeResolution.height)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mSuppressFrames)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mIsConnected)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mIsMounted)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mStageSize.width)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mStageSize.height)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mLastSubmittedFrameId)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mPresentingGeneration))) {
+        !ReadParam(aMsg, aIter, &(aResult->capabilityFlags)) ||
+        !ReadParam(aMsg, aIter, &(aResult->eyeResolution.width)) ||
+        !ReadParam(aMsg, aIter, &(aResult->eyeResolution.height)) ||
+        !ReadParam(aMsg, aIter, &(aResult->suppressFrames)) ||
+        !ReadParam(aMsg, aIter, &(aResult->isConnected)) ||
+        !ReadParam(aMsg, aIter, &(aResult->isMounted)) ||
+        !ReadParam(aMsg, aIter, &(aResult->stageSize.width)) ||
+        !ReadParam(aMsg, aIter, &(aResult->stageSize.height)) ||
+        !ReadParam(aMsg, aIter, &(aResult->lastSubmittedFrameId)) ||
+        !ReadParam(aMsg, aIter, &(aResult->presentingGeneration))) {
       return false;
     }
     for (int i = 0; i < 16; i++) {
-      if (!ReadParam(aMsg, aIter, &(aResult->mSittingToStandingTransform[i]))) {
+      if (!ReadParam(aMsg, aIter, &(aResult->sittingToStandingTransform[i]))) {
         return false;
       }
     }
-    strncpy(aResult->mDisplayName, displayName.BeginReading(),
+    strncpy(aResult->displayName, displayName.BeginReading(),
             mozilla::gfx::kVRDisplayNameMaxLen);
     for (int i = 0; i < mozilla::gfx::VRDisplayState::NumEyes; i++) {
-      if (!ReadParam(aMsg, aIter, &(aResult->mEyeFOV[i])) ||
-          !ReadParam(aMsg, aIter, &(aResult->mEyeTranslation[i].x)) ||
-          !ReadParam(aMsg, aIter, &(aResult->mEyeTranslation[i].y)) ||
-          !ReadParam(aMsg, aIter, &(aResult->mEyeTranslation[i].z))) {
+      if (!ReadParam(aMsg, aIter, &(aResult->eyeFOV[i])) ||
+          !ReadParam(aMsg, aIter, &(aResult->eyeTranslation[i].x)) ||
+          !ReadParam(aMsg, aIter, &(aResult->eyeTranslation[i].y)) ||
+          !ReadParam(aMsg, aIter, &(aResult->eyeTranslation[i].z))) {
         return false;
       }
     }
     return true;
   }
 };
 
 template <>
--- a/gfx/vr/service/OSVRSession.cpp
+++ b/gfx/vr/service/OSVRSession.cpp
@@ -331,65 +331,65 @@ void OSVRSession::InitializeDisplay() {
         mDisplayConfigInitialized = true;
       }
     }
   }
 }
 
 bool OSVRSession::InitState(mozilla::gfx::VRSystemState& aSystemState) {
   VRDisplayState& state = aSystemState.displayState;
-  strncpy(state.mDisplayName, "OSVR HMD", kVRDisplayNameMaxLen);
-  state.mEightCC = GFX_VR_EIGHTCC('O', 'S', 'V', 'R', ' ', ' ', ' ', ' ');
-  state.mIsConnected = true;
-  state.mIsMounted = false;
-  state.mCapabilityFlags = (VRDisplayCapabilityFlags)(
+  strncpy(state.displayName, "OSVR HMD", kVRDisplayNameMaxLen);
+  state.eightCC = GFX_VR_EIGHTCC('O', 'S', 'V', 'R', ' ', ' ', ' ', ' ');
+  state.isConnected = true;
+  state.isMounted = false;
+  state.capabilityFlags = (VRDisplayCapabilityFlags)(
       (int)VRDisplayCapabilityFlags::Cap_None |
       (int)VRDisplayCapabilityFlags::Cap_Orientation |
       (int)VRDisplayCapabilityFlags::Cap_Position |
       (int)VRDisplayCapabilityFlags::Cap_External |
       (int)VRDisplayCapabilityFlags::Cap_Present);
-  state.mReportsDroppedFrames = false;
+  state.reportsDroppedFrames = false;
 
   // XXX OSVR display topology allows for more than one viewer
   // will assume only one viewer for now (most likely stay that way)
 
   OSVR_EyeCount numEyes;
   osvr_ClientGetNumEyesForViewer(m_display, 0, &numEyes);
 
   for (uint8_t eye = 0; eye < numEyes; eye++) {
     double left, right, bottom, top;
     // XXX for now there is only one surface per eye
     osvr_ClientGetViewerEyeSurfaceProjectionClippingPlanes(
         m_display, 0, eye, 0, &left, &right, &bottom, &top);
-    state.mEyeFOV[eye] = SetFromTanRadians(-left, right, -bottom, top);
+    state.eyeFOV[eye] = SetFromTanRadians(-left, right, -bottom, top);
   }
 
   // XXX Assuming there is only one display input for now
   // however, it's possible to have more than one (dSight with 2 HDMI inputs)
   OSVR_DisplayDimension width, height;
   osvr_ClientGetDisplayDimensions(m_display, 0, &width, &height);
 
   for (uint8_t eye = 0; eye < numEyes; eye++) {
     OSVR_ViewportDimension l, b, w, h;
     osvr_ClientGetRelativeViewportForViewerEyeSurface(m_display, 0, eye, 0, &l,
                                                       &b, &w, &h);
-    state.mEyeResolution.width = w;
-    state.mEyeResolution.height = h;
+    state.eyeResolution.width = w;
+    state.eyeResolution.height = h;
     OSVR_Pose3 eyePose;
     // Viewer eye pose may not be immediately available, update client context
     // until we get it
     OSVR_ReturnCode ret =
         osvr_ClientGetViewerEyePose(m_display, 0, eye, &eyePose);
     while (ret != OSVR_RETURN_SUCCESS) {
       osvr_ClientUpdate(m_ctx);
       ret = osvr_ClientGetViewerEyePose(m_display, 0, eye, &eyePose);
     }
-    state.mEyeTranslation[eye].x = eyePose.translation.data[0];
-    state.mEyeTranslation[eye].y = eyePose.translation.data[1];
-    state.mEyeTranslation[eye].z = eyePose.translation.data[2];
+    state.eyeTranslation[eye].x = eyePose.translation.data[0];
+    state.eyeTranslation[eye].y = eyePose.translation.data[1];
+    state.eyeTranslation[eye].z = eyePose.translation.data[2];
 
     Matrix4x4 pose;
     pose.SetRotationFromQuaternion(gfx::Quaternion(
         osvrQuatGetX(&eyePose.rotation), osvrQuatGetY(&eyePose.rotation),
         osvrQuatGetZ(&eyePose.rotation), osvrQuatGetW(&eyePose.rotation)));
     pose.PreTranslate(eyePose.translation.data[0], eyePose.translation.data[1],
                       eyePose.translation.data[2]);
     pose.Invert();
--- a/gfx/vr/service/OculusSession.cpp
+++ b/gfx/vr/service/OculusSession.cpp
@@ -151,20 +151,20 @@ dom::GamepadHand OculusControllerHand[2]
 ovrButton OculusControllerButtons[2][kNumOculusButtons] = {
     {ovrButton_LThumb, (ovrButton)0, (ovrButton)0, ovrButton_X, ovrButton_Y,
      (ovrButton)0},
     {ovrButton_RThumb, (ovrButton)0, (ovrButton)0, ovrButton_A, ovrButton_B,
      (ovrButton)0},
 };
 
 ovrTouch OculusControllerTouches[2][kNumOculusButtons] = {
-    {ovrTouch_LThumb, ovrTouch_LIndexTrigger, (ovrTouch)0, ovrTouch_X, ovrTouch_Y,
-     ovrTouch_LThumbRest},
-    {ovrTouch_RThumb, ovrTouch_RIndexTrigger, (ovrTouch)0, ovrTouch_A, ovrTouch_B,
-     ovrTouch_RThumbRest},
+    {ovrTouch_LThumb, ovrTouch_LIndexTrigger, (ovrTouch)0, ovrTouch_X,
+     ovrTouch_Y, ovrTouch_LThumbRest},
+    {ovrTouch_RThumb, ovrTouch_RIndexTrigger, (ovrTouch)0, ovrTouch_A,
+     ovrTouch_B, ovrTouch_RThumbRest},
 };
 
 void UpdateButton(const ovrInputState& aInputState, uint32_t aHandIdx,
                   uint32_t aButtonIdx, VRControllerState& aControllerState) {
   if (aInputState.Buttons & OculusControllerButtons[aHandIdx][aButtonIdx]) {
     aControllerState.buttonPressed |= ((uint64_t)1 << aButtonIdx);
   }
   if (aInputState.Touches & OculusControllerTouches[aHandIdx][aButtonIdx]) {
@@ -222,19 +222,18 @@ bool OculusSession::Initialize(mozilla::
   // with visible session once WebVR content starts rendering.
   if (!ChangeVisibility(false)) {
     return false;
   }
   if (!InitState(aSystemState)) {
     return false;
   }
 
-  mPresentationSize =
-      IntSize(aSystemState.displayState.mEyeResolution.width * 2,
-              aSystemState.displayState.mEyeResolution.height);
+  mPresentationSize = IntSize(aSystemState.displayState.eyeResolution.width * 2,
+                              aSystemState.displayState.eyeResolution.height);
   return true;
 }
 
 void OculusSession::UpdateVisibility() {
   // Do not immediately re-initialize with an invisible session after
   // the end of a VR presentation.  Waiting for the configured duraction
   // ensures that the user will not drop to Oculus Home during VR link
   // traversal.
@@ -323,23 +322,23 @@ void OculusSession::Shutdown() {
 
 void OculusSession::ProcessEvents(mozilla::gfx::VRSystemState& aSystemState) {
   if (!mSession) {
     return;
   }
 
   ovrSessionStatus status;
   if (OVR_SUCCESS(ovr_GetSessionStatus(mSession, &status))) {
-    aSystemState.displayState.mIsConnected = status.HmdPresent;
-    aSystemState.displayState.mIsMounted = status.HmdMounted;
+    aSystemState.displayState.isConnected = status.HmdPresent;
+    aSystemState.displayState.isMounted = status.HmdMounted;
     mShouldQuit = status.ShouldQuit;
 
   } else {
-    aSystemState.displayState.mIsConnected = false;
-    aSystemState.displayState.mIsMounted = false;
+    aSystemState.displayState.isConnected = false;
+    aSystemState.displayState.isMounted = false;
   }
   UpdateHaptics();
   UpdateVisibility();
   CoverTransitions();
 }
 
 void OculusSession::StartFrame(mozilla::gfx::VRSystemState& aSystemState) {
   UpdateHeadsetPose(aSystemState);
@@ -477,24 +476,24 @@ bool OculusSession::SubmitFrame(
   ovrLayerEyeFov layer;
   memset(&layer, 0, sizeof(layer));
   layer.Header.Type = ovrLayerType_EyeFov;
   layer.Header.Flags = 0;
   layer.ColorTexture[0] = mTextureSet;
   layer.ColorTexture[1] = nullptr;
   layer.Fov[0] = mFOVPort[0];
   layer.Fov[1] = mFOVPort[1];
-  layer.Viewport[0].Pos.x = textureDesc.Width * aLayer.mLeftEyeRect.x;
-  layer.Viewport[0].Pos.y = textureDesc.Height * aLayer.mLeftEyeRect.y;
-  layer.Viewport[0].Size.w = textureDesc.Width * aLayer.mLeftEyeRect.width;
-  layer.Viewport[0].Size.h = textureDesc.Height * aLayer.mLeftEyeRect.height;
-  layer.Viewport[1].Pos.x = textureDesc.Width * aLayer.mRightEyeRect.x;
-  layer.Viewport[1].Pos.y = textureDesc.Height * aLayer.mRightEyeRect.y;
-  layer.Viewport[1].Size.w = textureDesc.Width * aLayer.mRightEyeRect.width;
-  layer.Viewport[1].Size.h = textureDesc.Height * aLayer.mRightEyeRect.height;
+  layer.Viewport[0].Pos.x = textureDesc.Width * aLayer.leftEyeRect.x;
+  layer.Viewport[0].Pos.y = textureDesc.Height * aLayer.leftEyeRect.y;
+  layer.Viewport[0].Size.w = textureDesc.Width * aLayer.leftEyeRect.width;
+  layer.Viewport[0].Size.h = textureDesc.Height * aLayer.leftEyeRect.height;
+  layer.Viewport[1].Pos.x = textureDesc.Width * aLayer.rightEyeRect.x;
+  layer.Viewport[1].Pos.y = textureDesc.Height * aLayer.rightEyeRect.y;
+  layer.Viewport[1].Size.w = textureDesc.Width * aLayer.rightEyeRect.width;
+  layer.Viewport[1].Size.h = textureDesc.Height * aLayer.rightEyeRect.height;
 
   for (uint32_t i = 0; i < 2; ++i) {
     layer.RenderPose[i].Orientation.x = mFrameStartPose[i].Orientation.x;
     layer.RenderPose[i].Orientation.y = mFrameStartPose[i].Orientation.y;
     layer.RenderPose[i].Orientation.z = mFrameStartPose[i].Orientation.z;
     layer.RenderPose[i].Orientation.w = mFrameStartPose[i].Orientation.w;
     layer.RenderPose[i].Position.x = mFrameStartPose[i].Position.x;
     layer.RenderPose[i].Position.y = mFrameStartPose[i].Position.y;
@@ -976,59 +975,59 @@ void OculusSession::StopRendering() {
     ovr_DestroyTextureSwapChain(mSession, mTextureSet);
   }
   mTextureSet = nullptr;
   mIsPresenting = false;
 }
 
 bool OculusSession::InitState(VRSystemState& aSystemState) {
   VRDisplayState& state = aSystemState.displayState;
-  strncpy(state.mDisplayName, "Oculus VR HMD", kVRDisplayNameMaxLen);
-  state.mIsConnected = true;
-  state.mIsMounted = false;
+  strncpy(state.displayName, "Oculus VR HMD", kVRDisplayNameMaxLen);
+  state.isConnected = true;
+  state.isMounted = false;
 
   ovrHmdDesc desc = ovr_GetHmdDesc(mSession);
 
-  state.mCapabilityFlags = VRDisplayCapabilityFlags::Cap_None;
+  state.capabilityFlags = VRDisplayCapabilityFlags::Cap_None;
   if (desc.AvailableTrackingCaps & ovrTrackingCap_Orientation) {
-    state.mCapabilityFlags |= VRDisplayCapabilityFlags::Cap_Orientation;
-    state.mCapabilityFlags |= VRDisplayCapabilityFlags::Cap_AngularAcceleration;
+    state.capabilityFlags |= VRDisplayCapabilityFlags::Cap_Orientation;
+    state.capabilityFlags |= VRDisplayCapabilityFlags::Cap_AngularAcceleration;
   }
   if (desc.AvailableTrackingCaps & ovrTrackingCap_Position) {
-    state.mCapabilityFlags |= VRDisplayCapabilityFlags::Cap_Position;
-    state.mCapabilityFlags |= VRDisplayCapabilityFlags::Cap_LinearAcceleration;
-    state.mCapabilityFlags |= VRDisplayCapabilityFlags::Cap_StageParameters;
+    state.capabilityFlags |= VRDisplayCapabilityFlags::Cap_Position;
+    state.capabilityFlags |= VRDisplayCapabilityFlags::Cap_LinearAcceleration;
+    state.capabilityFlags |= VRDisplayCapabilityFlags::Cap_StageParameters;
   }
-  state.mCapabilityFlags |= VRDisplayCapabilityFlags::Cap_External;
-  state.mCapabilityFlags |= VRDisplayCapabilityFlags::Cap_MountDetection;
-  state.mCapabilityFlags |= VRDisplayCapabilityFlags::Cap_Present;
-  state.mReportsDroppedFrames = true;
+  state.capabilityFlags |= VRDisplayCapabilityFlags::Cap_External;
+  state.capabilityFlags |= VRDisplayCapabilityFlags::Cap_MountDetection;
+  state.capabilityFlags |= VRDisplayCapabilityFlags::Cap_Present;
+  state.reportsDroppedFrames = true;
 
   mFOVPort[VRDisplayState::Eye_Left] = desc.DefaultEyeFov[ovrEye_Left];
   mFOVPort[VRDisplayState::Eye_Right] = desc.DefaultEyeFov[ovrEye_Right];
 
-  state.mEyeFOV[VRDisplayState::Eye_Left] =
+  state.eyeFOV[VRDisplayState::Eye_Left] =
       FromFovPort(mFOVPort[VRDisplayState::Eye_Left]);
-  state.mEyeFOV[VRDisplayState::Eye_Right] =
+  state.eyeFOV[VRDisplayState::Eye_Right] =
       FromFovPort(mFOVPort[VRDisplayState::Eye_Right]);
 
   float pixelsPerDisplayPixel = 1.0;
   ovrSizei texSize[2];
 
   // get eye texture sizes
   for (uint32_t eye = 0; eye < VRDisplayState::NumEyes; eye++) {
     texSize[eye] = ovr_GetFovTextureSize(mSession, (ovrEyeType)eye,
                                          mFOVPort[eye], pixelsPerDisplayPixel);
   }
 
   // take the max of both for eye resolution
-  state.mEyeResolution.width = std::max(texSize[VRDisplayState::Eye_Left].w,
-                                        texSize[VRDisplayState::Eye_Right].w);
-  state.mEyeResolution.height = std::max(texSize[VRDisplayState::Eye_Left].h,
-                                         texSize[VRDisplayState::Eye_Right].h);
+  state.eyeResolution.width = std::max(texSize[VRDisplayState::Eye_Left].w,
+                                       texSize[VRDisplayState::Eye_Right].w);
+  state.eyeResolution.height = std::max(texSize[VRDisplayState::Eye_Left].h,
+                                        texSize[VRDisplayState::Eye_Right].h);
 
   // default to an identity quaternion
   aSystemState.sensorState.pose.orientation[3] = 1.0f;
 
   UpdateStageParameters(state);
   UpdateEyeParameters(aSystemState);
 
   VRHMDSensorState& sensorState = aSystemState.sensorState;
@@ -1040,68 +1039,68 @@ bool OculusSession::InitState(VRSystemSt
   return true;
 }
 
 void OculusSession::UpdateStageParameters(VRDisplayState& aState) {
   ovrVector3f playArea;
   ovrResult res =
       ovr_GetBoundaryDimensions(mSession, ovrBoundary_PlayArea, &playArea);
   if (res == ovrSuccess) {
-    aState.mStageSize.width = playArea.x;
-    aState.mStageSize.height = playArea.z;
+    aState.stageSize.width = playArea.x;
+    aState.stageSize.height = playArea.z;
   } else {
     // If we fail, fall back to reasonable defaults.
     // 1m x 1m space
-    aState.mStageSize.width = 1.0f;
-    aState.mStageSize.height = 1.0f;
+    aState.stageSize.width = 1.0f;
+    aState.stageSize.height = 1.0f;
   }
 
   float eyeHeight =
       ovr_GetFloat(mSession, OVR_KEY_EYE_HEIGHT, OVR_DEFAULT_EYE_HEIGHT);
 
-  aState.mSittingToStandingTransform[0] = 1.0f;
-  aState.mSittingToStandingTransform[1] = 0.0f;
-  aState.mSittingToStandingTransform[2] = 0.0f;
-  aState.mSittingToStandingTransform[3] = 0.0f;
+  aState.sittingToStandingTransform[0] = 1.0f;
+  aState.sittingToStandingTransform[1] = 0.0f;
+  aState.sittingToStandingTransform[2] = 0.0f;
+  aState.sittingToStandingTransform[3] = 0.0f;
 
-  aState.mSittingToStandingTransform[4] = 0.0f;
-  aState.mSittingToStandingTransform[5] = 1.0f;
-  aState.mSittingToStandingTransform[6] = 0.0f;
-  aState.mSittingToStandingTransform[7] = 0.0f;
+  aState.sittingToStandingTransform[4] = 0.0f;
+  aState.sittingToStandingTransform[5] = 1.0f;
+  aState.sittingToStandingTransform[6] = 0.0f;
+  aState.sittingToStandingTransform[7] = 0.0f;
 
-  aState.mSittingToStandingTransform[8] = 0.0f;
-  aState.mSittingToStandingTransform[9] = 0.0f;
-  aState.mSittingToStandingTransform[10] = 1.0f;
-  aState.mSittingToStandingTransform[11] = 0.0f;
+  aState.sittingToStandingTransform[8] = 0.0f;
+  aState.sittingToStandingTransform[9] = 0.0f;
+  aState.sittingToStandingTransform[10] = 1.0f;
+  aState.sittingToStandingTransform[11] = 0.0f;
 
-  aState.mSittingToStandingTransform[12] = 0.0f;
-  aState.mSittingToStandingTransform[13] = eyeHeight;
-  aState.mSittingToStandingTransform[14] = 0.0f;
-  aState.mSittingToStandingTransform[15] = 1.0f;
+  aState.sittingToStandingTransform[12] = 0.0f;
+  aState.sittingToStandingTransform[13] = eyeHeight;
+  aState.sittingToStandingTransform[14] = 0.0f;
+  aState.sittingToStandingTransform[15] = 1.0f;
 }
 
 void OculusSession::UpdateEyeParameters(VRSystemState& aState) {
   if (!mSession) {
     return;
   }
   // This must be called every frame in order to
   // account for continuous adjustments to ipd.
   gfx::Matrix4x4 headToEyeTransforms[2];
   for (uint32_t eye = 0; eye < VRDisplayState::NumEyes; eye++) {
     // As of Oculus 1.17 SDK, we must use the ovr_GetRenderDesc2 function to
     // return the updated version of ovrEyeRenderDesc.  This is normally done by
     // the Oculus static lib shim, but we need to do this explicitly as we are
     // loading the Oculus runtime dll directly.
     ovrEyeRenderDesc renderDesc =
         ovr_GetRenderDesc2(mSession, (ovrEyeType)eye, mFOVPort[eye]);
-    aState.displayState.mEyeTranslation[eye].x =
+    aState.displayState.eyeTranslation[eye].x =
         renderDesc.HmdToEyePose.Position.x;
-    aState.displayState.mEyeTranslation[eye].y =
+    aState.displayState.eyeTranslation[eye].y =
         renderDesc.HmdToEyePose.Position.y;
-    aState.displayState.mEyeTranslation[eye].z =
+    aState.displayState.eyeTranslation[eye].z =
         renderDesc.HmdToEyePose.Position.z;
 
     Matrix4x4 pose;
     pose.SetRotationFromQuaternion(
         gfx::Quaternion(renderDesc.HmdToEyePose.Orientation.x,
                         renderDesc.HmdToEyePose.Orientation.y,
                         renderDesc.HmdToEyePose.Orientation.z,
                         renderDesc.HmdToEyePose.Orientation.w));
@@ -1367,17 +1366,17 @@ void OculusSession::UpdateControllerInpu
 
 void OculusSession::UpdateTelemetry(VRSystemState& aSystemState) {
   if (!mSession) {
     return;
   }
   ovrPerfStats perfStats;
   if (ovr_GetPerfStats(mSession, &perfStats) == ovrSuccess) {
     if (perfStats.FrameStatsCount) {
-      aSystemState.displayState.mDroppedFrameCount =
+      aSystemState.displayState.droppedFrameCount =
           perfStats.FrameStats[0].AppDroppedFrameCount;
     }
   }
 }
 
 void OculusSession::VibrateHaptic(uint32_t aControllerIdx,
                                   uint32_t aHapticIndex, float aIntensity,
                                   float aDuration) {
--- a/gfx/vr/service/OpenVRSession.cpp
+++ b/gfx/vr/service/OpenVRSession.cpp
@@ -740,44 +740,44 @@ void OpenVRSession::Shutdown() {
     mVRCompositor = nullptr;
     mVRChaperone = nullptr;
     mVRSystem = nullptr;
   }
 }
 
 bool OpenVRSession::InitState(VRSystemState& aSystemState) {
   VRDisplayState& state = aSystemState.displayState;
-  strncpy(state.mDisplayName, "OpenVR HMD", kVRDisplayNameMaxLen);
-  state.mEightCC = GFX_VR_EIGHTCC('O', 'p', 'e', 'n', 'V', 'R', ' ', ' ');
-  state.mIsConnected =
+  strncpy(state.displayName, "OpenVR HMD", kVRDisplayNameMaxLen);
+  state.eightCC = GFX_VR_EIGHTCC('O', 'p', 'e', 'n', 'V', 'R', ' ', ' ');
+  state.isConnected =
       mVRSystem->IsTrackedDeviceConnected(::vr::k_unTrackedDeviceIndex_Hmd);
-  state.mIsMounted = false;
-  state.mCapabilityFlags = (VRDisplayCapabilityFlags)(
+  state.isMounted = false;
+  state.capabilityFlags = (VRDisplayCapabilityFlags)(
       (int)VRDisplayCapabilityFlags::Cap_None |
       (int)VRDisplayCapabilityFlags::Cap_Orientation |
       (int)VRDisplayCapabilityFlags::Cap_Position |
       (int)VRDisplayCapabilityFlags::Cap_External |
       (int)VRDisplayCapabilityFlags::Cap_Present |
       (int)VRDisplayCapabilityFlags::Cap_StageParameters);
-  state.mReportsDroppedFrames = true;
+  state.reportsDroppedFrames = true;
 
   ::vr::ETrackedPropertyError err;
   bool bHasProximitySensor = mVRSystem->GetBoolTrackedDeviceProperty(
       ::vr::k_unTrackedDeviceIndex_Hmd, ::vr::Prop_ContainsProximitySensor_Bool,
       &err);
   if (err == ::vr::TrackedProp_Success && bHasProximitySensor) {
-    state.mCapabilityFlags = (VRDisplayCapabilityFlags)(
-        (int)state.mCapabilityFlags |
+    state.capabilityFlags = (VRDisplayCapabilityFlags)(
+        (int)state.capabilityFlags |
         (int)VRDisplayCapabilityFlags::Cap_MountDetection);
   }
 
   uint32_t w, h;
   mVRSystem->GetRecommendedRenderTargetSize(&w, &h);
-  state.mEyeResolution.width = w;
-  state.mEyeResolution.height = h;
+  state.eyeResolution.width = w;
+  state.eyeResolution.height = h;
 
   // default to an identity quaternion
   aSystemState.sensorState.pose.orientation[3] = 1.0f;
 
   UpdateStageParameters(state);
   UpdateEyeParameters(aSystemState);
 
   VRHMDSensorState& sensorState = aSystemState.sensorState;
@@ -790,85 +790,85 @@ bool OpenVRSession::InitState(VRSystemSt
 }
 
 void OpenVRSession::UpdateStageParameters(VRDisplayState& aState) {
   float sizeX = 0.0f;
   float sizeZ = 0.0f;
   if (mVRChaperone->GetPlayAreaSize(&sizeX, &sizeZ)) {
     ::vr::HmdMatrix34_t t =
         mVRSystem->GetSeatedZeroPoseToStandingAbsoluteTrackingPose();
-    aState.mStageSize.width = sizeX;
-    aState.mStageSize.height = sizeZ;
+    aState.stageSize.width = sizeX;
+    aState.stageSize.height = sizeZ;
 
-    aState.mSittingToStandingTransform[0] = t.m[0][0];
-    aState.mSittingToStandingTransform[1] = t.m[1][0];
-    aState.mSittingToStandingTransform[2] = t.m[2][0];
-    aState.mSittingToStandingTransform[3] = 0.0f;
+    aState.sittingToStandingTransform[0] = t.m[0][0];
+    aState.sittingToStandingTransform[1] = t.m[1][0];
+    aState.sittingToStandingTransform[2] = t.m[2][0];
+    aState.sittingToStandingTransform[3] = 0.0f;
 
-    aState.mSittingToStandingTransform[4] = t.m[0][1];
-    aState.mSittingToStandingTransform[5] = t.m[1][1];
-    aState.mSittingToStandingTransform[6] = t.m[2][1];
-    aState.mSittingToStandingTransform[7] = 0.0f;
+    aState.sittingToStandingTransform[4] = t.m[0][1];
+    aState.sittingToStandingTransform[5] = t.m[1][1];
+    aState.sittingToStandingTransform[6] = t.m[2][1];
+    aState.sittingToStandingTransform[7] = 0.0f;
 
-    aState.mSittingToStandingTransform[8] = t.m[0][2];
-    aState.mSittingToStandingTransform[9] = t.m[1][2];
-    aState.mSittingToStandingTransform[10] = t.m[2][2];
-    aState.mSittingToStandingTransform[11] = 0.0f;
+    aState.sittingToStandingTransform[8] = t.m[0][2];
+    aState.sittingToStandingTransform[9] = t.m[1][2];
+    aState.sittingToStandingTransform[10] = t.m[2][2];
+    aState.sittingToStandingTransform[11] = 0.0f;
 
-    aState.mSittingToStandingTransform[12] = t.m[0][3];
-    aState.mSittingToStandingTransform[13] = t.m[1][3];
-    aState.mSittingToStandingTransform[14] = t.m[2][3];
-    aState.mSittingToStandingTransform[15] = 1.0f;
+    aState.sittingToStandingTransform[12] = t.m[0][3];
+    aState.sittingToStandingTransform[13] = t.m[1][3];
+    aState.sittingToStandingTransform[14] = t.m[2][3];
+    aState.sittingToStandingTransform[15] = 1.0f;
   } else {
     // If we fail, fall back to reasonable defaults.
     // 1m x 1m space, 0.75m high in seated position
-    aState.mStageSize.width = 1.0f;
-    aState.mStageSize.height = 1.0f;
+    aState.stageSize.width = 1.0f;
+    aState.stageSize.height = 1.0f;
 
-    aState.mSittingToStandingTransform[0] = 1.0f;
-    aState.mSittingToStandingTransform[1] = 0.0f;
-    aState.mSittingToStandingTransform[2] = 0.0f;
-    aState.mSittingToStandingTransform[3] = 0.0f;
+    aState.sittingToStandingTransform[0] = 1.0f;
+    aState.sittingToStandingTransform[1] = 0.0f;
+    aState.sittingToStandingTransform[2] = 0.0f;
+    aState.sittingToStandingTransform[3] = 0.0f;
 
-    aState.mSittingToStandingTransform[4] = 0.0f;
-    aState.mSittingToStandingTransform[5] = 1.0f;
-    aState.mSittingToStandingTransform[6] = 0.0f;
-    aState.mSittingToStandingTransform[7] = 0.0f;
+    aState.sittingToStandingTransform[4] = 0.0f;
+    aState.sittingToStandingTransform[5] = 1.0f;
+    aState.sittingToStandingTransform[6] = 0.0f;
+    aState.sittingToStandingTransform[7] = 0.0f;
 
-    aState.mSittingToStandingTransform[8] = 0.0f;
-    aState.mSittingToStandingTransform[9] = 0.0f;
-    aState.mSittingToStandingTransform[10] = 1.0f;
-    aState.mSittingToStandingTransform[11] = 0.0f;
+    aState.sittingToStandingTransform[8] = 0.0f;
+    aState.sittingToStandingTransform[9] = 0.0f;
+    aState.sittingToStandingTransform[10] = 1.0f;
+    aState.sittingToStandingTransform[11] = 0.0f;
 
-    aState.mSittingToStandingTransform[12] = 0.0f;
-    aState.mSittingToStandingTransform[13] = 0.75f;
-    aState.mSittingToStandingTransform[14] = 0.0f;
-    aState.mSittingToStandingTransform[15] = 1.0f;
+    aState.sittingToStandingTransform[12] = 0.0f;
+    aState.sittingToStandingTransform[13] = 0.75f;
+    aState.sittingToStandingTransform[14] = 0.0f;
+    aState.sittingToStandingTransform[15] = 1.0f;
   }
 }
 
 void OpenVRSession::UpdateEyeParameters(VRSystemState& aState) {
   // This must be called every frame in order to
   // account for continuous adjustments to ipd.
   gfx::Matrix4x4 headToEyeTransforms[2];
 
   for (uint32_t eye = 0; eye < 2; ++eye) {
     ::vr::HmdMatrix34_t eyeToHead =
         mVRSystem->GetEyeToHeadTransform(static_cast<::vr::Hmd_Eye>(eye));
-    aState.displayState.mEyeTranslation[eye].x = eyeToHead.m[0][3];
-    aState.displayState.mEyeTranslation[eye].y = eyeToHead.m[1][3];
-    aState.displayState.mEyeTranslation[eye].z = eyeToHead.m[2][3];
+    aState.displayState.eyeTranslation[eye].x = eyeToHead.m[0][3];
+    aState.displayState.eyeTranslation[eye].y = eyeToHead.m[1][3];
+    aState.displayState.eyeTranslation[eye].z = eyeToHead.m[2][3];
 
     float left, right, up, down;
     mVRSystem->GetProjectionRaw(static_cast<::vr::Hmd_Eye>(eye), &left, &right,
                                 &up, &down);
-    aState.displayState.mEyeFOV[eye].upDegrees = atan(-up) * 180.0 / M_PI;
-    aState.displayState.mEyeFOV[eye].rightDegrees = atan(right) * 180.0 / M_PI;
-    aState.displayState.mEyeFOV[eye].downDegrees = atan(down) * 180.0 / M_PI;
-    aState.displayState.mEyeFOV[eye].leftDegrees = atan(-left) * 180.0 / M_PI;
+    aState.displayState.eyeFOV[eye].upDegrees = atan(-up) * 180.0 / M_PI;
+    aState.displayState.eyeFOV[eye].rightDegrees = atan(right) * 180.0 / M_PI;
+    aState.displayState.eyeFOV[eye].downDegrees = atan(down) * 180.0 / M_PI;
+    aState.displayState.eyeFOV[eye].leftDegrees = atan(-left) * 180.0 / M_PI;
 
     Matrix4x4 pose;
     // NOTE! eyeToHead.m is a 3x4 matrix, not 4x4.  But
     // because of its arrangement, we can copy the 12 elements in and
     // then transpose them to the right place.
     memcpy(&pose._11, &eyeToHead.m, sizeof(eyeToHead.m));
     pose.Transpose();
     pose.Invert();
@@ -1888,32 +1888,32 @@ void OpenVRSession::ProcessEvents(mozill
     mShouldQuit = true;
   }
 
   ::vr::VREvent_t event;
   while (mVRSystem && mVRSystem->PollNextEvent(&event, sizeof(event))) {
     switch (event.eventType) {
       case ::vr::VREvent_TrackedDeviceUserInteractionStarted:
         if (event.trackedDeviceIndex == ::vr::k_unTrackedDeviceIndex_Hmd) {
-          aSystemState.displayState.mIsMounted = true;
+          aSystemState.displayState.isMounted = true;
         }
         break;
       case ::vr::VREvent_TrackedDeviceUserInteractionEnded:
         if (event.trackedDeviceIndex == ::vr::k_unTrackedDeviceIndex_Hmd) {
-          aSystemState.displayState.mIsMounted = false;
+          aSystemState.displayState.isMounted = false;
         }
         break;
       case ::vr::EVREventType::VREvent_TrackedDeviceActivated:
         if (event.trackedDeviceIndex == ::vr::k_unTrackedDeviceIndex_Hmd) {
-          aSystemState.displayState.mIsConnected = true;
+          aSystemState.displayState.isConnected = true;
         }
         break;
       case ::vr::EVREventType::VREvent_TrackedDeviceDeactivated:
         if (event.trackedDeviceIndex == ::vr::k_unTrackedDeviceIndex_Hmd) {
-          aSystemState.displayState.mIsConnected = false;
+          aSystemState.displayState.isConnected = false;
         }
         break;
       case ::vr::EVREventType::VREvent_DriverRequestedQuit:
       case ::vr::EVREventType::VREvent_Quit:
       // When SteamVR runtime haven't been launched before viewing VR,
       // SteamVR will send a VREvent_ProcessQuit event. It will tell the parent
       // process to shutdown the VR process, and we need to avoid it.
       // case ::vr::EVREventType::VREvent_ProcessQuit:
@@ -1928,24 +1928,24 @@ void OpenVRSession::ProcessEvents(mozill
   }
 }
 
 #if defined(XP_WIN)
 bool OpenVRSession::SubmitFrame(
     const mozilla::gfx::VRLayer_Stereo_Immersive& aLayer,
     ID3D11Texture2D* aTexture) {
   return SubmitFrame((void*)aTexture, ::vr::ETextureType::TextureType_DirectX,
-                     aLayer.mLeftEyeRect, aLayer.mRightEyeRect);
+                     aLayer.leftEyeRect, aLayer.rightEyeRect);
 }
 #elif defined(XP_MACOSX)
 bool OpenVRSession::SubmitFrame(
     const mozilla::gfx::VRLayer_Stereo_Immersive& aLayer,
     const VRLayerTextureHandle& aTexture) {
   return SubmitFrame(aTexture, ::vr::ETextureType::TextureType_IOSurface,
-                     aLayer.mLeftEyeRect, aLayer.mRightEyeRect);
+                     aLayer.leftEyeRect, aLayer.rightEyeRect);
 }
 #endif
 
 bool OpenVRSession::SubmitFrame(const VRLayerTextureHandle& aTextureHandle,
                                 ::vr::ETextureType aTextureType,
                                 const VRLayerEyeRect& aLeftEyeRect,
                                 const VRLayerEyeRect& aRightEyeRect) {
   ::vr::Texture_t tex;
@@ -2185,13 +2185,13 @@ void OpenVRSession::StopAllHaptics() {
     }
   }
 }
 
 void OpenVRSession::UpdateTelemetry(VRSystemState& aSystemState) {
   ::vr::Compositor_CumulativeStats stats;
   mVRCompositor->GetCumulativeStats(&stats,
                                     sizeof(::vr::Compositor_CumulativeStats));
-  aSystemState.displayState.mDroppedFrameCount = stats.m_nNumReprojectedFrames;
+  aSystemState.displayState.droppedFrameCount = stats.m_nNumReprojectedFrames;
 }
 
 }  // namespace gfx
 }  // namespace mozilla
--- a/gfx/vr/service/VRService.cpp
+++ b/gfx/vr/service/VRService.cpp
@@ -25,17 +25,17 @@ using namespace mozilla;
 using namespace mozilla::gfx;
 using namespace std;
 
 namespace {
 
 int64_t FrameIDFromBrowserState(const mozilla::gfx::VRBrowserState& aState) {
   for (const auto& layer : aState.layerState) {
     if (layer.type == VRLayerType::LayerType_Stereo_Immersive) {
-      return layer.layer_stereo_immersive.mFrameId;
+      return layer.layer_stereo_immersive.frameId;
     }
   }
   return 0;
 }
 
 bool IsImmersiveContentActive(const mozilla::gfx::VRBrowserState& aState) {
   for (const auto& layer : aState.layerState) {
     if (layer.type == VRLayerType::LayerType_Stereo_Immersive) {
@@ -256,34 +256,34 @@ void VRService::ServiceInitialize() {
   } else {
     // VR hardware was not detected.
     // We must inform the browser of the failure so it may try again
     // later and resolve WebVR promises.  A failure or shutdown is
     // indicated by enumerationCompleted being set to true, with all
     // other fields remaining zeroed out.
     memset(&mSystemState, 0, sizeof(mSystemState));
     mSystemState.enumerationCompleted = true;
-    mSystemState.displayState.mMinRestartInterval =
+    mSystemState.displayState.minRestartInterval =
         gfxPrefs::VRExternalNotDetectedTimeout();
     mSystemState.displayState.shutdown = true;
     PushState(mSystemState);
   }
 }
 
 void VRService::ServiceShutdown() {
   MOZ_ASSERT(IsInServiceThread());
 
   // Notify the browser that we have shut down.
   // This is indicated by enumerationCompleted being set
   // to true, with all other fields remaining zeroed out.
   memset(&mSystemState, 0, sizeof(mSystemState));
   mSystemState.enumerationCompleted = true;
   mSystemState.displayState.shutdown = true;
   if (mSession && mSession->ShouldQuit()) {
-    mSystemState.displayState.mMinRestartInterval =
+    mSystemState.displayState.minRestartInterval =
         gfxPrefs::VRExternalQuitTimeout();
   }
   PushState(mSystemState);
   mSession = nullptr;
 }
 
 void VRService::ServiceWaitForImmersive() {
   MOZ_ASSERT(IsInServiceThread());
@@ -336,35 +336,35 @@ void VRService::ServiceImmersiveMode() {
     mSession->StopPresentation();
     MessageLoop::current()->PostTask(
         NewRunnableMethod("gfx::VRService::ServiceWaitForImmersive", this,
                           &VRService::ServiceWaitForImmersive));
     return;
   }
 
   uint64_t newFrameId = FrameIDFromBrowserState(mBrowserState);
-  if (newFrameId != mSystemState.displayState.mLastSubmittedFrameId) {
+  if (newFrameId != mSystemState.displayState.lastSubmittedFrameId) {
     // A new immersive frame has been received.
     // Submit the textures to the VR system compositor.
     bool success = false;
     for (const auto& layer : mBrowserState.layerState) {
       if (layer.type == VRLayerType::LayerType_Stereo_Immersive) {
         // SubmitFrame may block in order to control the timing for
         // the next frame start
         success = mSession->SubmitFrame(layer.layer_stereo_immersive);
         break;
       }
     }
 
     // Changing mLastSubmittedFrameId triggers a new frame to start
     // rendering.  Changes to mLastSubmittedFrameId and the values
     // used for rendering, such as headset pose, must be pushed
     // atomically to the browser.
-    mSystemState.displayState.mLastSubmittedFrameId = newFrameId;
-    mSystemState.displayState.mLastSubmittedFrameSuccessful = success;
+    mSystemState.displayState.lastSubmittedFrameId = newFrameId;
+    mSystemState.displayState.lastSubmittedFrameSuccessful = success;
 
     // StartFrame may block to control the timing for the next frame start
     mSession->StartFrame(mSystemState);
     mSystemState.sensorState.inputFrameID++;
     size_t historyIndex =
         mSystemState.sensorState.inputFrameID % ArrayLength(mFrameStartTime);
     mFrameStartTime[historyIndex] = TimeStamp::Now();
     PushState(mSystemState);
--- a/gfx/vr/service/VRSession.cpp
+++ b/gfx/vr/service/VRSession.cpp
@@ -55,21 +55,21 @@ ID3DDeviceContextState* VRSession::GetD3
 }
 
 #endif  // defined(XP_WIN)
 
 bool VRSession::SubmitFrame(
     const mozilla::gfx::VRLayer_Stereo_Immersive& aLayer) {
 #if defined(XP_WIN)
 
-  if (aLayer.mTextureType ==
+  if (aLayer.textureType ==
       VRLayerTextureType::LayerTextureType_D3D10SurfaceDescriptor) {
     RefPtr<ID3D11Texture2D> dxTexture;
     HRESULT hr = mDevice->OpenSharedResource(
-        (HANDLE)aLayer.mTextureHandle, __uuidof(ID3D11Texture2D),
+        (HANDLE)aLayer.textureHandle, __uuidof(ID3D11Texture2D),
         (void**)(ID3D11Texture2D**)getter_AddRefs(dxTexture));
     if (FAILED(hr) || !dxTexture) {
       NS_WARNING("Failed to open shared texture");
       return false;
     }
 
     // Similar to LockD3DTexture in TextureD3D11.cpp
     RefPtr<IDXGIKeyedMutex> mutex;
@@ -96,19 +96,18 @@ bool VRSession::SubmitFrame(
     if (!success) {
       return false;
     }
     return true;
   }
 
 #elif defined(XP_MACOSX)
 
-  if (aLayer.mTextureType ==
-      VRLayerTextureType::LayerTextureType_MacIOSurface) {
-    return SubmitFrame(aLayer, aLayer.mTextureHandle);
+  if (aLayer.textureType == VRLayerTextureType::LayerTextureType_MacIOSurface) {
+    return SubmitFrame(aLayer, aLayer.textureHandle);
   }
 
 #endif
 
   return false;
 }
 
 void VRSession::UpdateTrigger(VRControllerState& aState, uint32_t aButtonIndex,