Closed
Bug 1306415
Opened 9 years ago
Closed 9 years ago
[webvr] Implement VRFrameData and VRDisplay.getFrameData
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: kip, Assigned: kip)
References
()
Details
Attachments
(2 files, 2 obsolete files)
1.42 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
14.71 KB,
patch
|
daoshengmu
:
review+
|
Details | Diff | Splinter Review |
The WebVR 1.1 Spec added a new interface, VRFrameData:
https://w3c.github.io/webvr/#interface-vrframedata
This is used with the new VRDisplay.getFrameData function:
https://w3c.github.io/webvr/#dom-vrdisplay-getframedata
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 1•9 years ago
|
||
The patches in this bug are rebased onto Bug 1306427. Please land Bug 1306427 first.
Depends on: 1306427
Assignee | ||
Comment 3•9 years ago
|
||
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8797817 -
Attachment is obsolete: true
Assignee | ||
Comment 5•9 years ago
|
||
Assignee | ||
Comment 6•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8798590 -
Flags: review?(bugs)
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8798589 [details] [diff] [review]
Bug 1306415 - Part 1: Implement VRFrameData and VRDisplay.getFrameData
@Smaug: Would you be able to review the webidl / dom bits of this one?
Perhaps @Daosheng could take a look at the rest of the implementation.
Attachment #8798589 -
Flags: review?(daoshengmu)
Attachment #8798589 -
Flags: review?(bugs)
Assignee | ||
Comment 8•9 years ago
|
||
Sorry I could not upload to mozreview. These patches are rebased onto others that have not yet landed.
Comment 9•9 years ago
|
||
Comment on attachment 8798589 [details] [diff] [review]
Bug 1306415 - Part 1: Implement VRFrameData and VRDisplay.getFrameData
>+NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(VRFrameData)
>+ NS_IMPL_CYCLE_COLLECTION_UNLINK(mParent, mPose)
>+ NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
>+ tmp->mPose = nullptr;
You already unlink mPose above
>+VRFrameData::LazyCreateMatrix(JS::Heap<JSObject*>& aArray, gfx::Matrix4x4& aMat, JSContext* aCx,
>+ JS::MutableHandle<JSObject*> aRetval, ErrorResult& aRv)
align the latter arguments under the arguments in the first line
Attachment #8798589 -
Flags: review?(bugs) → review+
Updated•9 years ago
|
Attachment #8798590 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 10•9 years ago
|
||
Updated with review feedback from Smaug
Attachment #8798589 -
Attachment is obsolete: true
Attachment #8798589 -
Flags: review?(daoshengmu)
Assignee | ||
Updated•9 years ago
|
Attachment #8798590 -
Flags: review?(daoshengmu)
Assignee | ||
Updated•9 years ago
|
Attachment #8798590 -
Flags: review?(daoshengmu)
Assignee | ||
Updated•9 years ago
|
Attachment #8799016 -
Flags: review?(dmu)
![]() |
||
Comment 11•9 years ago
|
||
Comment on attachment 8799016 [details] [diff] [review]
Bug 1306415 - Part 1: Implement VRFrameData and VRDisplay.getFrameData, r=smaug
Review of attachment 8799016 [details] [diff] [review]:
-----------------------------------------------------------------
It looks good to me. Just some nits for fixing.
::: dom/vr/VRDisplay.cpp
@@ +827,5 @@
> + matHead.SetRotationFromQuaternion(qt);
> + matHead.PreTranslate(pos);
> +
> + mLeftView = matHead;
> + mLeftView.PostTranslate(
Probably, you can try to use mLeftView.PostTranslate(-aInfo.mEyeTranslation[gfx::VRDisplayInfo::Eye_Left]) to make it more concise.
@@ +839,5 @@
> + -aInfo.mEyeTranslation[gfx::VRDisplayInfo::Eye_Right][0],
> + -aInfo.mEyeTranslation[gfx::VRDisplayInfo::Eye_Right][1],
> + -aInfo.mEyeTranslation[gfx::VRDisplayInfo::Eye_Right][2]
> + );
> +
Same here. could you use mRightView.PostTranslate(-aInfo.mEyeTranslation[gfx::VRDisplayInfo::Eye_Right])?
Attachment #8799016 -
Flags: review?(dmu) → review+
Assignee | ||
Comment 12•9 years ago
|
||
Assignee | ||
Comment 13•9 years ago
|
||
(In reply to Daosheng Mu[:daoshengmu] from comment #11)
> Comment on attachment 8799016 [details] [diff] [review]
> Bug 1306415 - Part 1: Implement VRFrameData and VRDisplay.getFrameData,
> r=smaug
>
> Review of attachment 8799016 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> It looks good to me. Just some nits for fixing.
>
> ::: dom/vr/VRDisplay.cpp
> @@ +827,5 @@
> > + matHead.SetRotationFromQuaternion(qt);
> > + matHead.PreTranslate(pos);
> > +
> > + mLeftView = matHead;
> > + mLeftView.PostTranslate(
>
> Probably, you can try to use
> mLeftView.PostTranslate(-aInfo.mEyeTranslation[gfx::VRDisplayInfo::
> Eye_Left]) to make it more concise.
>
> @@ +839,5 @@
> > + -aInfo.mEyeTranslation[gfx::VRDisplayInfo::Eye_Right][0],
> > + -aInfo.mEyeTranslation[gfx::VRDisplayInfo::Eye_Right][1],
> > + -aInfo.mEyeTranslation[gfx::VRDisplayInfo::Eye_Right][2]
> > + );
> > +
>
> Same here. could you use
> mRightView.PostTranslate(-aInfo.mEyeTranslation[gfx::VRDisplayInfo::
> Eye_Right])?
Good catch, thanks! I have corrected this.
Assignee | ||
Comment 14•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d3bda4876ada99e344f4b7a7cef5b5345a3948c8
Bug 1306415 - Part 1: Implement VRFrameData and VRDisplay.getFrameData,r=smaug,r=dmu
https://hg.mozilla.org/integration/mozilla-inbound/rev/96db3a1d6e6617777ef624ca63912f5cd260f74e
Bug 1306415 - Part 2: Add VRFrameData to test_interfaces.html,r=smaug
![]() |
||
Comment 15•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d3bda4876ada
https://hg.mozilla.org/mozilla-central/rev/96db3a1d6e66
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•