Screen tearing on Inkscape (OS X)
Dear Inkscape-devel,
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.
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?
Regards, _______________________ Papoj "Hua" Thamjaroenporn papoj@...3117...
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
As I understand from the video, the artifacts appear when rotating the object and moving the canvas around. How is this different from artifacts from panning and dragging objects?
So it seems that there are multiple sources of screen tearing artifacts. I have found a few that I can reproduce both on OS X (either backend) and Linux machines, and those include moving object(s) when there are things that are outside of view. This is probably related to Cairo as in the thread https://bugs.launchpad.net/inkscape/+bug/1267208 that you mentioned. Based on the email http://sourceforge.net/p/inkscape/mailman/message/32334231/ thread, I am not sure if this cache is properly fixed yet (except you can “hot fix” by turning it off). How are we doing on this?
What puzzles me is that when I tried Help -> Tutorials -> Inkscape: Basic, scrolling and zooming content (_not_ interacting with the objects themselves) on Linux is much smoother on the Mac, even with lots of contents outside of view. Why is tearing platform specific in this case (see some screenshots http://imgur.com/a/C59df here)? If this has to do with Cairo, it should happen on both platforms.
What I am able to reproduce only on OS X (with either backend) is the basic stuff: dragging curve control points and moving simple objects (like, 2 curves) around canvas. I do not see artifacts doing so on Linux. Do we know what causes these tearing artifacts and how we can fix them?
Regards, _______________________ Papoj "Hua" Thamjaroenporn papoj@...3117...
On Oct 29, 2015, at 5:00 AM, su_v <suv@...2204...> wrote:
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
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (2)
-
Papoj Thamjaroenporn
-
su_v