After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 628291 - Drawing artifacts when used with a cairo 1.9.*
Drawing artifacts when used with a cairo 1.9.*
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.21.x
Other Windows
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-08-30 08:31 UTC by Maarten Bosmans
Modified: 2010-09-12 09:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.81 KB, patch)
2010-08-30 08:48 UTC, Maarten Bosmans
none Details | Review
gdk: Ensure flush of surface when cairo_t is destroyed (1.69 KB, patch)
2010-08-31 23:01 UTC, Benjamin Otte (Company)
none Details | Review

Description Maarten Bosmans 2010-08-30 08:31:27 UTC
When using the latest Gtk+ 2.21.6 with the latest Cairo 1.9.14 snapshot some rendering is incorrect. It is mainly with cellrenderers and the button mouseovers. This is on Windows using the Murrine theme engine. On Windows using the default engine or on Linux with Murrine everything looks OK.

I traced it back to this Cairo commit
http://cgit.freedesktop.org/cairo/commit/?id=4438cc6a49e7e902dce045706f7125a2c3e2174b
This means quite a change in semantics for cairo_destroy which obviously impacts the Cairo/native interaction.
Comment 1 Tor Lillqvist 2010-08-30 08:39:19 UTC
Don't use the Murrine theme engine then? My personal opinion is that the only theme engine worth even trying to support for GTK+ on Windows is the MS-Windows one. Even that is hard enough, as has been seen.
Comment 2 Maarten Bosmans 2010-08-30 08:48:31 UTC
Created attachment 169037 [details] [review]
proposed patch

This patch fixes the problem.

It is based on the gtk-2-22 branch. I don't know whether it is applicable to master too.
Comment 3 Maarten Bosmans 2010-08-30 08:50:50 UTC
(In reply to comment #1)
> Don't use the Murrine theme engine then? My personal opinion is that the only
> theme engine worth even trying to support for GTK+ on Windows is the MS-Windows
> one. Even that is hard enough, as has been seen.

Murrine has been working very good on Windows for me.

Moreover, I think that the patch is correct and an improvement for every platform, even though only the particular combination of Windows+Murrine exhibits the defects.
Comment 4 Benjamin Otte (Company) 2010-08-31 23:01:43 UTC
Created attachment 169201 [details] [review]
gdk: Ensure flush of surface when cairo_t is destroyed

Add an ugly workaround because GTK does not ensure surfaces get flushed
before directly accessing the drawable backed by the surface. This is
not visible on X11 (where flushing is a no-op), but can be seen on
Windows.
Comment 5 Maarten Bosmans 2010-09-01 06:19:43 UTC
(In reply to comment #4)
> Created an attachment (id=169201) [details] [review]
> gdk: Ensure flush of surface when cairo_t is destroyed

That patch also solves the problem. I'm not sure why it is better then my patch, but my main concern is that one of the patches gets in git in time for the 2.22 release.
Comment 6 Benjamin Otte (Company) 2010-09-02 09:47:34 UTC
I suppose my patch is preferrable becaues it only changes one place and because it works for all the other places where you didn't cairo_surface_flush() after a cairo_destroy() yet. ;)
Comment 7 Maarten Bosmans 2010-09-06 20:42:50 UTC
Is it possible to land one of the patches in time for the 2.22 release?

(I do not have commit access)
Comment 8 Benjamin Otte (Company) 2010-09-07 00:43:41 UTC
Pushed to 2.22 branch, but not master.
Comment 9 Tor Lillqvist 2010-09-12 03:18:14 UTC
Could this be cherry-picked to gtk-2-20, too?
Comment 10 Benjamin Otte (Company) 2010-09-12 09:51:51 UTC
Sure. It's pretty much a no-op on anything but win32, so go ahead.