Re: [fullscreen] Problems with mouse-edge scrolling and games

On Mon, Feb 24, 2014 at 4:17 AM, Florian Bösch <pyalot@gmail.com> wrote:

> On Mon, Feb 24, 2014 at 1:16 AM, Thibaut Despoulain <thibaut@artillery.com
> > wrote:
>
>>  I've written a test for this here:
>>> http://codeflow.org/issues/software-cursor.html
>>>
>>> My observation from testing on linux is that I can't distinguish latency
>>> for the software cursor from the OS cursor (or not by much anyway) in
>>> google chrome. In firefox however there's noticable lag. Mileage may vary
>>> for other platforms.
>>>
>>
>> This is true, but sadly your test runs on an empty animation frame. If
>> your main thread is doing a lot of work already (barely hitting the 60fps
>> mark, as it is the case for demanding games), the lag will be much more
>> perceptible as you will most likely drop a frame every now and then.
>>
>
> I regard dropping below 60fps as an application defect for a realtime
> interactive application where the users input is time critical.
>

First, mouse input is always time-critical, even if the application itself
is not.  Even for a spreadsheet, the mouse must still move responsively,
since pointing devices are difficult to use with any delay.  Some games
only run graphics at 30 FPS (like it or not), but the pointer if any must
still update at 60 FPS.

Second, system-driven pointers allow better responsiveness than is possible
at the application level.  They can process mouse input and update the
mouse cursor right when the backbuffer is flipped, giving the lowest
possible latency.  Applications (especially web apps) simply can't do that.

Going forward this could be even more severe.  For example, AirPlay video
streaming has significant video delay, but they could send mouse movement
over a sideband and draw it on the rendering device, allowing responsive
mouse movement where it would otherwise be impossible.

It's not the application's job to keep the mouse cursor responsive, it's
the system's.  Hiding the system mouse cursor and drawing one manually is
always a bad idea.

-- 
Glenn Maynard

Received on Monday, 24 February 2014 16:18:48 UTC