
On 2015-10-29 05:23 (+0100), Papoj Thamjaroenporn wrote:
I recently picked up Inkscape again, and there is this screen tearing https://en.wikipedia.org/wiki/Screen_tearing issue I have seen on OS X, and I am wondering what the causes are and how I may be able to contribute.
As far as I understand, screen tearing seems to be an issue specific to GTK2. This happens when I scroll or zoom the canvas, where screen refresh rate is not synced with canvas rendering. This happens either on X-based version (I tried using the official Inkscape app) or Quartz-based version (I tried by compiling the trunk using Quartz variants). I also found that ~suv has this exciting development on native OS X integration with GTK3. The artifacts I have seen are exactly like in this screen recording https://inkscape.org/en/gallery/item/4556/ of Inkscape with GTK2 that ~suv posted.
The rendering issue demonstrated in that screen recording is specific to the Quartz backend and affects GTK2 as well as GTK3 builds. The problem with the Quartz backend seems to be that screen updates are mostly triggered with events happening in GUI elements (thus it's getting worse when hiding the rulers and the status bar, and really bad when hiding all GUI elements with Shift+F11). These kinds or redraw issues do _not_ happen with the X11-backend (e.g. with the official Inkscape 0.91 package for OS X).
There are other known rendering artifacts exposed with the new cairo-based renderer mostly not specific to the backend e.g. when dragging stroked objects, rotating objects, or when releasing clips of groups. Panning-related tearing artifacts may be seen with all backends but are possibly worse with some backends (Windows). Several issues have been reported in the bug tracker, some had been brought up here on the list (e.g. Gez reported about an issue with the renderer's caching: http://sourceforge.net/p/inkscape/mailman/message/32334231/ which may causes tearing e.g. when dragging objects which extended beyond the currently visible canvas area).
Some reports about tearing: 1510704 strong visual tearing / rendering glitches while moving objects https://bugs.launchpad.net/inkscape/+bug/1510704
1264485 Temporarily torn rendering https://bugs.launchpad.net/inkscape/+bug/1264485
1265697 Panning causes visual tearing https://bugs.launchpad.net/inkscape/+bug/1265697 (this one seems to have platform-specific aspects, mostly on Windows)
So, am I correct to say that GTK3 somehow eliminates this problem, even without native OS X integration? How does it do so? If we stay with GTK2 as of now, is there a way to fix the tearing issue?
AFAIU GTK3 exposes issue with Inkscape's current canvas implementation, and is not per se a solution or improvement: canvas flickering (e.g. when panning or scrolling) happens with all backends of GTK3, on-top of whatever other backend-specific issues there already are (the redraw issues with Quartz for example persist).
Regards, V