Much higher stylus movement precision on OS X

Authored by poke1024 on Sep 19 2017, 8:59 PM.



This patch disables mouse coalescing on OS X, thereby producing a 3 to 4 times higher frequency of mouse/table move events.

For reproducing its effects, this patch includes some low quality debug code triggered via DEBUG_TABLET_MOVE_DT.

Testing on an iMac 5K (4 GHz i7, AMD Radeon R 9), maximum times between consecutive tablet move events while drawing went from about 35 ms to 9 ms.

without patch:

with patch:

This is my first Phabricator patch.

Test Plan

Draw on an empty canvas using a tablet and moving the stylus in fast circles. You will see much less edginess on OS X if the patch is in place.

Diff Detail

R37 Krita
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
poke1024 created this revision.Sep 19 2017, 8:59 PM

I think the addition of debugging code around DEBUG_TABLET_MOVE_DT wouldn't be needed. The tablet log can already show the event frequency and timing. (Also, that code has some inconsistent indentations.)

You should add the GPL header to new files.

Also, please check the inline comment.

88 ↗(On Diff #19676)

Would it make more sense to call this from main(), since it would seem to be a process-wise setting? It's not like you're reverting the setting in the destructor.

rempt accepted this revision.Sep 20 2017, 9:05 AM
rempt added a subscriber: rempt.

I like the patch, it does improve the issue a bit on my macbook pro with intuos 3, though there are still bent lines showing up -- but I also see them in your second screenshot. I agree with Alvin's remarks -- we probably don't need the debug code to go in? In any case, I'd like to push this patch to 3.3 for today's RC builds.

This revision is now accepted and ready to land.Sep 20 2017, 9:05 AM
This revision was automatically updated to reflect the committed changes.