Commit Graph
7 Commits
Author SHA1 Message Date
Olli Pettay 9375e345e2 Bug 1795624 - remove dom.input_events.strict_input_vsync_alignment, r=sefeng
Had to rename input_event_queue.supported to dom.input_event_queue.supported so that
it could be used as a static pref.

Differential Revision: https://phabricator.services.mozilla.com/D159488
2022-10-17 17:02:24 +00:00
Sean Feng dc353ff97a Bug 1708070 - Use VsyncTaskManager::WillRunTask to change InputVsyncState r=smaug
Currently, we use `VsyncTaskManager::DidRunTask` to change state from
`RunVsync` to `NoPendingVsync`, however, the issue is that if the vsync
starts an event loop (for instance, by using requestAnimationFrame), and
the event loop starts another input task, Firefox crashes because input
tasks don't expect the state to be `RunVsync`.

So instead of using `DidRunTask`, we start to use `WillRunTask` to fix
it.

Differential Revision: https://phabricator.services.mozilla.com/D113613
2021-04-29 16:39:30 +00:00
Sean Feng 2b9405bd6c Bug 1697585 - Make input tasks can be more strictly aligned with Vsync r=smaug
This patch introduces a new way to way to schedule input tasks, such
that input tasks remain at `InputHigh` priority normally, however, when
there's a pending `Vsync` priority task in the task queue, we
increase the priority of input tasks from `InputHigh` to `InputHighest` to
rush processing the pending input tasks.

There are two restrictions to ensure we don't delay vsync too much:
  - There's a hard limit duration
  - We won't process the input tasks that are newly added after we've
    started to process the current number of input tasks

Differential Revision: https://phabricator.services.mozilla.com/D109499
2021-04-14 19:56:42 +00:00
Sean Feng b543ad6b51 Bug 1697585 - Add VsyncTaskManager r=bas,smaug
Introduce a new TaskManager called VsyncTaskManager for
EventQueuePriority::Vsync tasks.

Differential Revision: https://phabricator.services.mozilla.com/D109498
2021-04-14 19:56:42 +00:00
Brindusan Cristian 2e90a569b4 Backed out 5 changesets (bug 1697585) for causing build bustages on nsTimerImpl.h. CLOSED TREE
Backed out changeset e9e4a710e7d1 (bug 1697585)
Backed out changeset bc271f42bcb7 (bug 1697585)
Backed out changeset d8516aec6a5e (bug 1697585)
Backed out changeset 0b1bc6cb84af (bug 1697585)
Backed out changeset 074ebebaee27 (bug 1697585)
2021-04-06 17:45:02 +03:00
Sean Feng e828222dac Bug 1697585 - Make input tasks can be more strictly aligned with Vsync r=smaug
This patch introduces a new way to way to schedule input tasks, such
that input tasks remain at `InputHigh` priority normally, however, when
there's a pending `Vsync` priority task in the task queue, we
increase the priority of input tasks from `InputHigh` to `InputHighest` to
rush processing the pending input tasks.

There are two restrictions to ensure we don't delay vsync too much:
  - There's a hard limit duration
  - We won't process the input tasks that are newly added after we've
    started to process the current number of input tasks

Differential Revision: https://phabricator.services.mozilla.com/D109499
2021-04-06 13:10:51 +00:00
Sean Feng 47ae9f1d7a Bug 1697585 - Add VsyncTaskManager r=bas,smaug
Introduce a new TaskManager called VsyncTaskManager for
EventQueuePriority::Vsync tasks.

Differential Revision: https://phabricator.services.mozilla.com/D109498
2021-04-06 13:10:51 +00:00