Closed
Bug 1392217
Opened 7 years ago
Closed 7 years ago
Implement VR thread for submitting frames
Categories
(Core :: WebVR, enhancement, P1)
Core
WebVR
Tracking
()
RESOLVED
FIXED
mozilla59
People
(Reporter: daoshengmu, Assigned: daoshengmu)
References
Details
Attachments
(2 files)
No description provided.
Assignee | ||
Updated•7 years ago
|
Summary: Implement VR thread for MacOSX → Implement VR thread for submitting frames
Updated•7 years ago
|
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → dmu
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8928459 [details]
Bug 1392217 - Part 1: Refactor the VR vibrate thread to be as a VRThread and manage its lifetime;
https://reviewboard.mozilla.org/r/199710/#review204794
C/C++ static analysis found 3 defects in this patch.
You can run this analysis locally with: `./mach static-analysis check path/to/file.cpp`
::: gfx/vr/VRThread.h:54
(Diff revision 1)
> +class VRThread final
> +{
> + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VRListenerThreadHolder)
> +
> +public:
> + VRThread(const nsCString& aName);
Error: Bad implicit conversion constructor for 'vrthread' [clang-tidy: mozilla-implicit-constructor]
::: gfx/vr/VRThread.h:54
(Diff revision 1)
> +class VRThread final
> +{
> + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VRListenerThreadHolder)
> +
> +public:
> + VRThread(const nsCString& aName);
Error: Bad implicit conversion constructor for 'vrthread' [clang-tidy: mozilla-implicit-constructor]
::: gfx/vr/VRThread.cpp:119
(Diff revision 1)
> return VRListenerThread() &&
> VRListenerThread()->thread_id() == PlatformThread::CurrentId();
> }
>
> -} // namespace gfx
> -} // namespace mozilla
> +// VRThread lifetime is 30 secs by default
> +VRThread::VRThread(const nsCString& aName)
Error: Bad implicit conversion constructor for 'vrthread' [clang-tidy: mozilla-implicit-constructor]
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•7 years ago
|
||
Try looks good, https://treeherder.mozilla.org/#/jobs?repo=try&revision=f5a8be6f84842e1854648e1158469cab49b6fa20.
This bug needs to wait for Bug 1404534 lands.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8928459 [details]
Bug 1392217 - Part 1: Refactor the VR vibrate thread to be as a VRThread and manage its lifetime;
https://reviewboard.mozilla.org/r/199710/#review210540
C/C++ static analysis found 2 defects in this patch.
You can run this analysis locally with: `./mach static-analysis check path/to/file.cpp`
::: gfx/vr/VRThread.cpp:148
(Diff revision 3)
> + RefPtr<Runnable> runnable =
> + NewRunnableMethod<TimeStamp>(
> + "gfx::VRThread::CheckLife", this, &VRThread::CheckLife, TimeStamp::Now());
> + // Post it to the main thread for tracking the lifetime.
> + nsCOMPtr<nsIThread> mainThread;
> + rv = NS_GetMainThread(getter_AddRefs(mainThread));
Warning: Value stored to 'rv' is never read [clang-tidy: clang-analyzer-deadcode.DeadStores]
::: gfx/vr/VRThread.cpp:211
(Diff revision 3)
> + RefPtr<Runnable> runnable =
> + NewRunnableMethod<TimeStamp>(
> + "gfx::VRThread::CheckLife", this, &VRThread::CheckLife, TimeStamp::Now());
> + // Post it to the main thread for tracking the lifetime.
> + nsCOMPtr<nsIThread> mainThread;
> + nsresult rv = NS_GetMainThread(getter_AddRefs(mainThread));
Warning: Value stored to 'rv' during its initialization is never read [clang-tidy: clang-analyzer-deadcode.DeadStores]
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 11•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Attachment #8928459 -
Flags: review?(kgilbert)
Attachment #8929378 -
Flags: review?(kgilbert)
Comment 12•7 years ago
|
||
mozreview-review |
Comment on attachment 8928459 [details]
Bug 1392217 - Part 1: Refactor the VR vibrate thread to be as a VRThread and manage its lifetime;
https://reviewboard.mozilla.org/r/199710/#review210834
I like this, LGTM, thanks!
Attachment #8928459 -
Flags: review?(kgilbert) → review+
Comment 13•7 years ago
|
||
mozreview-review |
Comment on attachment 8929378 [details]
Bug 1392217 - Part 2: Spawn a VR submit thread in VRDisplayHost;
https://reviewboard.mozilla.org/r/200704/#review210838
Thanks Daosheng, this is looking good.
I can expect that we would later be doing "vr compositing" of multiple layers and objects in this thread before passing the texture to the VR APIs, but can later refactor if the "submit thread" name is too specific.
Attachment #8929378 -
Flags: review?(kgilbert) → review+
Comment 14•7 years ago
|
||
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.
hg error in cmd: hg rebase -s 538892d80ad3 -d b2db8b6d26d0: rebasing 437344:538892d80ad3 "Bug 1392217 - Part 1: Refactor the VR vibrate thread to be as a VRThread and manage its lifetime; r=kip"
merging gfx/vr/gfxVROculus.cpp
merging gfx/vr/gfxVROculus.h
merging gfx/vr/gfxVROpenVR.cpp
merging gfx/vr/gfxVROpenVR.h
warning: conflicts while merging gfx/vr/gfxVROculus.cpp! (edit, then use 'hg resolve --mark')
warning: conflicts while merging gfx/vr/gfxVROpenVR.cpp! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 17•7 years ago
|
||
Pushed by dmu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5ff619c6c130
Part 1: Refactor the VR vibrate thread to be as a VRThread and manage its lifetime; r=kip
https://hg.mozilla.org/integration/autoland/rev/7f2e53267220
Part 2: Spawn a VR submit thread in VRDisplayHost; r=kip
Comment 18•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5ff619c6c130
https://hg.mozilla.org/mozilla-central/rev/7f2e53267220
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•