Defer loading tasks when awaiting touch response
commit4f6007c09c89433b58986a4c517cc4fa76bcdbf9
authorjdduke <jdduke@chromium.org>
Wed, 11 Feb 2015 01:20:40 +0000 (10 17:20 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 11 Feb 2015 01:21:10 +0000 (11 01:21 +0000)
tree413ab4bf92bd047f8057702fea820de8811e501e
parent19f2c9038a40e72b43c4343dd5f39295705ebd4e
Defer loading tasks when awaiting touch response

Initial scroll response latency is highly sensitive to dispatch of
touchstart and the first touchmove events. Intervening operations
between the touchstart and touchmove can delay scroll event dispatch,
increasing real and perceived latency.

Introduce a touchstart-specific policy wherein loading tasks are
completely deferred. This mode is entered upon observation of a
touchstart event, and exited when either 1) actionable events like touch
movement or scroll updates are observed, or 2) a 100ms timeout expires.

BUG=452051,391005

Review URL: https://codereview.chromium.org/877143003

Cr-Commit-Position: refs/heads/master@{#315701}
content/renderer/scheduler/renderer_scheduler_impl.cc
content/renderer/scheduler/renderer_scheduler_impl.h
content/renderer/scheduler/renderer_scheduler_impl_unittest.cc
content/renderer/scheduler/renderer_task_queue_selector.cc
content/renderer/scheduler/renderer_task_queue_selector.h
content/renderer/scheduler/renderer_task_queue_selector_unittest.cc