Closed
Bug 1476380
Opened 7 years ago
Closed 7 years ago
Remove the spin wait in Android gfxVRExternal PullState calls
Categories
(Core :: WebVR, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: mortimergoro, Assigned: mortimergoro)
Details
Attachments
(3 files)
6.60 KB,
patch
|
Details | Diff | Splinter Review | |
6.99 KB,
patch
|
kip
:
review+
|
Details | Diff | Splinter Review |
59 bytes,
text/x-review-board-request
|
kip
:
review+
|
Details |
gfxVRExternal is using spin wait on Android instead of condition variables to wait for some conditions. This drains the battery on Android, specially when the headset goes to sleep, or Android activity gets paused: WebVR thread is constantly waiting for an update.
Assignee | ||
Comment 1•7 years ago
|
||
This patch that gets rid Android spin waits and used condition variables instead. I added a optional lambda function to PullState method which makes the Pullstate method to wait for state changes until the lambda condition is satisfied (== returns true). This way we can reuse the smae wait algorithm from different places (e.g. waiting for enumaration and waiting for a SubmitFrame result)
Attachment #8992735 -
Flags: review?(kgilbert)
Attachment #8992735 -
Flags: checkin?(kgilbert)
![]() |
||
Comment 2•7 years ago
|
||
Comment on attachment 8992735 [details] [diff] [review]
Patch that gets rid of Android spin waits
checkin will be requested once the patch has been reviewed. Setting the keyword 'checkin-needed' is preferred.
Attachment #8992735 -
Flags: checkin?(kgilbert)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → imanol
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•7 years ago
|
||
Implemented the changes that Kip requested
Attachment #8992923 -
Flags: review?(kgilbert)
Comment 4•7 years ago
|
||
Comment on attachment 8992923 [details] [diff] [review]
spin_wait_patch_v2.diff
This LGTM, Thanks!
Attachment #8992923 -
Flags: review?(kgilbert) → review+
Comment hidden (mozreview-request) |
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8994537 [details]
Bug 1476380 - Remove the spin wait in Android gfxVRExternal PullState calls;
https://reviewboard.mozilla.org/r/259086/#review266148
LGTM, Thanks!
Attachment #8994537 -
Flags: review?(kgilbert) → review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by kgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/30b7766e0f82
Remove the spin wait in Android gfxVRExternal PullState calls; r=kip
Keywords: checkin-needed
Comment 8•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Comment 9•7 years ago
|
||
Comment on attachment 8992735 [details] [diff] [review]
Patch that gets rid of Android spin waits
Clearing review request, as other patch was landed.
Attachment #8992735 -
Flags: review?(kgilbert)
You need to log in
before you can comment on or make changes to this bug.
Description
•