bugMyPaint - Bugs: bug #21003, Brush strokes angular rather than...

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #21003: Brush strokes angular rather than smooth.

Submitted by:  Ryan Hasse <ryanhasse>
Submitted on:  Sun Aug 4 19:58:32 2013  
Severity: 3 - NormalPriority: 6
Status: FixedPrivacy: Public
Assigned to: Andrew Chadwick <achadwick>Open/Closed: Closed
Release: 2623bc3Planned Release: None
Operating System: Archlinux

(Jump to the original submission Jump to the original submission)

Wed Oct 23 00:58:35 2013, comment #8:

Marking as closed+fixed because this does not affect any stable versions, and because the bug which it is a duplicate of has been fixed.

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Sun Oct 20 04:04:23 2013, comment #7:

There is MyPaint code available in a branch addressing this bug now: see bug #20822. Ready to test.

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Tue Aug 20 19:45:45 2013, comment #6:

Okay, merged gtk3-stroke-queue.


Setting as duplicate since the remnant of this is purely a dup of bug 20822, which itself is due to an upstream bug, https://bugzilla.gnome.org/show_bug.cgi?id=702392

This merge may help to ameliorate the upcoming GTK+ 3.9 issue. To take advantage of this, brush authors should update their brushes to have a slow_tracking of around 0.5 to 1.0.

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Sat Aug 17 19:38:11 2013, comment #5:

Here's a sample of the improved smoothness at a faked (linearly interpolated) 400 Hz. Column on the left is master (without this patch); column on the right is the experimental branch I've been working on.

I've measured my raw input processing speeds with my equipment and (without background dabs to render) got ~50 or ~60 events per second with a Synaptics touchpad, and (to my surprise) ~200 (still!) with my Wacom Intuos 5. That's with the queueing branch.

So I guess that means I'm not yet affected by the upstream regression with Debian's GTK+ 3.8.2. 3.9 may deliver every event arriving at 50Hz or 60Hz, lamentably, so let's prepare for that as best we can.

Any visible angularity in the "wacom pen + no queues" scribble must have been due to rendering work alone slowing things down under GTK3. The upstream changes introduced in the linked bug do not explain the observed angularity for a device which would be processed at 200Hz without background work to do.

(I assume nothing's changed in the MyPaint rendering engine, so I'm stumped as to why GTK3 would be generally slower than GTK2 for processing input events, but it is and we have to deal with it. Scheduling changes? A refusal to re-schedule slow input handlers at a fast rate? I don't know.)

(file #18694)

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Mon Aug 5 10:07:48 2013, comment #4:

The major improvement seems to be the smaller chunking of stroke data, weirdly. Though I suppose the slightly less silly-looking fast turnaround of input events is generally worthy.

I'm not sure why. Looking at dtimes or queue lengths during long strokes does hint that it's related to CPU use (notable little spikes at split_stroke, for example), and smaller/simpler brushes seem less affected.

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Mon Aug 5 05:21:14 2013, comment #3:

Hm, that commit seems to help! I'll have to analyze this when I get more time, still puzzling about how this is even possible :-)

Martin Renold <martinxyz>
Project Administrator
Mon Aug 5 05:07:14 2013, comment #2:

Duplicate of https://gna.org/bugs/?20822

See also https://bugzilla.gnome.org/show_bug.cgi?id=702392

Martin Renold <martinxyz>
Project Administrator
Mon Aug 5 00:38:53 2013, comment #1:

Deevad's mentioned it too. Bisect reveals it's come about in commit 90b3ade2, basically the switchover to GTK3 in the default config.

There seems to be something fundamentally different in the scheduling of events between GTK2 and GTK3, at least with GI. It's difficult to say what's different between the two versions, but it's clear that the frequency with which events are received is very heavily affected by the amount of processing going on in the background (specifically how long it takes to handle each input event, and how much CPU use processing the event causes by sending off strokes to be rendered, and displaying the result on the way back).

Could you try https://gitorious.org/mypaint/mypaint/commits/gtk3-stroke-queue please, and let me know if it solves the problem acceptably? It's a bit of hack, and whether any improvement is seen is highly brush-dependent!

In particular, brushes which still show the problem after this workaround might be fixable by increasing the "Slow position tracking" setting to 0.5 or 1.0 from zero. I find the following standard brushes from Set#2 are OK:

  • deevad/rough
  • deevad/2B_pencil
  • deevad/pen

but not:

  • deevad/4H_pencil
  • deevad/basic_digital_brush
  • deevad/basic_digital_brush_smudging
  • (many others)

The difference is purely explained by the slow_tracking setting. Increasing this on master does not fix the problem, and superfast strokes with the 1st set look like the ones in the attachment.

(It looks like the toolbar dropdown is broken right now too; sigh. Looks like you get to try out the new brush settings editor as well!)

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Sun Aug 4 19:58:32 2013, original submission:

While I'm loving a lot about the new MyPaint I haven't been able to make the switch to the GTK3 version because brushstrokes aren't smooth. You can see what I mean in the attached image.

Ryan Hasse <ryanhasse>


Attached Files


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by martinxyz (Posted a comment)
  • -unavailable- added by achadwick (Posted a comment)
  • -unavailable- added by ryanhasse (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Oct 23 00:58:35 2013achadwickStatusDuplicate=>Fixed
    Tue Aug 20 19:45:45 2013achadwickSeverity4 - Important=>3 - Normal
      StatusReady For Test=>Duplicate
    Sat Aug 17 19:38:11 2013achadwickAttached File-=>Added test_at_pseudo400hz.jpg, #18694
    Mon Aug 5 00:38:53 2013achadwickSeverity3 - Normal=>4 - Important
      Priority5 - Normal=>6
      StatusNone=>Ready For Test
      Assigned toNone=>achadwick
    Sun Aug 4 19:58:32 2013ryanhasseAttached File-=>Added 2013-08-04_12.57.57.1100x703.png, #18634
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup