Bug 42889 - [git/1.11.3] oxygen-gtk pixmap errors; possible problem with cairo_surface_create_for_rectangle?
Summary: [git/1.11.3] oxygen-gtk pixmap errors; possible problem with cairo_surface_cr...
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.10.3
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
Depends on:
Blocks: cairo-1.12
  Show dependency treegraph
Reported: 2011-11-13 15:26 UTC by JR
Modified: 2012-01-17 11:25 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

oxygen-gtk pixmap weirdness (89.36 KB, image/png)
2011-11-13 15:26 UTC, JR

Description JR 2011-11-13 15:26:51 UTC
Created attachment 53490 [details]
oxygen-gtk pixmap weirdness

(Unsure of whether this belongs in the general component, so please reassign if inaccurate.)

Kubuntu 11.10 oneiric with libcairo2 from xorg-edgers ppa, package version 1.11.3+git20111109.90b2fd34-0ubuntu0ricotz~oneiric0.

Oxygen-GTK is a port of the default KDE widget theme (Oxygen) to GTK. Using cairo from git (as per package version above), it seems to be drawing stuff... wrong. It works fine with the cairo from the oneiric main repositories, which is version 1.10.2.

Initially submitted to the KDE bugtracker here: https://bugs.kde.org/show_bug.cgi?id=286348

There is a patch there for oxygen-gtk that replaces its use of cairo_surface_create_for_rectangle with cairo_surface_create_similar, which restores the normal behavior and everything draws nicely again.

The oxygen-gtk developers suspect the error lies in cairo and suggested I file a bug here too. Please see the above KDE bugtracker link for some of their comments.
Comment 1 Uli Schlachter 2011-11-15 09:43:43 UTC
First a note about testing (I didn't want to install this):
After building oxygen-gtk, symlinked liboxygen-gtk.so in ~/.gtk-2.0/engines/ and wrote this to my ~/.gtkrc-2.0:

include "path/to/oxygen/source/rc/gtkrc"

After this, I could reproduce the bug with oxygen-gtk/demo/oxygen-gtk-demo.

Git bisect says that this broke in the following commit:

commit ba855a12e8d686f2137f82d317791f3ec4a68fc0
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Oct 14 16:01:27 2011 +0100


If one just reverts the changes to cairo-surface-subsurface.c, the bug goes away, so the change to cairo-xlib-source.c doesn't seem guilty. I guess something, somewhere treats a surface as an xlib surface when it shouldn't. However, shouldn't that cause crashes?
Someone else can continue looking into this, I ran out of time.

Now I'll try to figure out why xlib-xcb segfaults....
Comment 2 Uli Schlachter 2012-01-17 11:25:21 UTC
I just noticed that this was already fixed:

commit 894d8c8bf7cd83be8775c79233f21d9c11c14b2a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Nov 23 15:40:15 2011 +0000

    xlib: Handle subsurfaces correctly
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.