Commit bd50b903 authored by Andi-Bogdan Postelnicu's avatar Andi-Bogdan Postelnicu
Browse files

Bug 1411630 - make mozilla::gfx::VRHMDSensorState to be trivial typed. r=kip

MozReview-Commit-ID: 7BniyasLIQD

--HG--
extra : rebase_source : ad7603dd8e2f8ea93989833de09624108aa7bd31
parent 7838f765
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -30,6 +30,7 @@ VRMockDisplay::VRMockDisplay(const nsCString& aID, uint32_t aDeviceID)
 : mDeviceID(aDeviceID)
 : mDeviceID(aDeviceID)
 , mTimestamp(TimeStamp::Now())
 , mTimestamp(TimeStamp::Now())
{
{
  memset(&mDisplayInfo, 0, sizeof(mDisplayInfo));
  mDisplayInfo.mDisplayName = aID;
  mDisplayInfo.mDisplayName = aID;
  mDisplayInfo.mType = VRDeviceType::Puppet;
  mDisplayInfo.mType = VRDeviceType::Puppet;
  mDisplayInfo.mIsConnected = true;
  mDisplayInfo.mIsConnected = true;
+2 −0
Original line number Original line Diff line number Diff line
@@ -65,6 +65,8 @@ VRDisplayHost::VRDisplayHost(VRDeviceType aType)
 : mFrameStarted(false)
 : mFrameStarted(false)
{
{
  MOZ_COUNT_CTOR(VRDisplayHost);
  MOZ_COUNT_CTOR(VRDisplayHost);
  memset(&mDisplayInfo, 0, sizeof(VRDisplayInfo));
  memset(&mLastUpdateDisplayInfo, 0, sizeof(VRDisplayInfo));
  mDisplayInfo.mType = aType;
  mDisplayInfo.mType = aType;
  mDisplayInfo.mDisplayID = VRSystemManager::AllocateDisplayID();
  mDisplayInfo.mDisplayID = VRSystemManager::AllocateDisplayID();
  mDisplayInfo.mPresentingGroups = 0;
  mDisplayInfo.mPresentingGroups = 0;
+0 −4
Original line number Original line Diff line number Diff line
@@ -133,10 +133,6 @@ struct VRFieldOfView {
};
};


struct VRHMDSensorState {
struct VRHMDSensorState {
  VRHMDSensorState()
  {
    Clear();
  }
  int64_t inputFrameID;
  int64_t inputFrameID;
  double timestamp;
  double timestamp;
  VRDisplayCapabilityFlags flags;
  VRDisplayCapabilityFlags flags;
+1 −1
Original line number Original line Diff line number Diff line
@@ -287,7 +287,7 @@ VRDisplayOSVR::GetSensorState()
  //this usually goes into app's mainloop
  //this usually goes into app's mainloop
  osvr_ClientUpdate(*m_ctx);
  osvr_ClientUpdate(*m_ctx);


  VRHMDSensorState result;
  VRHMDSensorState result{};
  OSVR_TimeValue timestamp;
  OSVR_TimeValue timestamp;


  OSVR_OrientationState orientation;
  OSVR_OrientationState orientation;
+4 −4
Original line number Original line Diff line number Diff line
@@ -863,7 +863,7 @@ VRDisplayOculus::ZeroSensor()
VRHMDSensorState
VRHMDSensorState
VRDisplayOculus::GetSensorState()
VRDisplayOculus::GetSensorState()
{
{
  VRHMDSensorState result;
  VRHMDSensorState result{};
  if (mSession->IsTrackingReady()) {
  if (mSession->IsTrackingReady()) {
    double predictedFrameTime = 0.0f;
    double predictedFrameTime = 0.0f;
    if (gfxPrefs::VRPosePredictionEnabled()) {
    if (gfxPrefs::VRPosePredictionEnabled()) {
@@ -882,7 +882,7 @@ VRDisplayOculus::GetSensorState()
VRHMDSensorState
VRHMDSensorState
VRDisplayOculus::GetSensorState(double absTime)
VRDisplayOculus::GetSensorState(double absTime)
{
{
  VRHMDSensorState result;
  VRHMDSensorState result{};


  ovrTrackingState state = ovr_GetTrackingState(mSession->Get(), absTime, true);
  ovrTrackingState state = ovr_GetTrackingState(mSession->Get(), absTime, true);
  ovrPoseStatef& pose(state.HeadPose);
  ovrPoseStatef& pose(state.HeadPose);
Loading