[cairo-bugs] [Bug 67505] GIMP image rendering is broken with --enable-xlib-xcb

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Sep 26 07:54:45 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=67505

--- Comment #6 from Uli Schlachter <psychon at znc.in> ---
Created attachment 86655
  --> https://bugs.freedesktop.org/attachment.cgi?id=86655&action=edit
Use same fix in cairo-xcb as in cairo-xlib

First, why does the existing code for in-place uploads in cairo-xcb not work
here? The xfer surface that gimp uses has format ARGB32 aka depth=32, but the
displayshell (or whatever it is called) only has depth=24. This means that the
upload cannot be done with core X11.

cairo-xlib uses SHM's CreatePixmap request to have the server allocate a pixmap
for this shm segment and then uses RENDER's Composite to copy over the data.

The attached patch implements the same in this one place for cairo-xcb, but
IMHO there is way too much copy&paste for the actual copy-the-data-from-pixmap.
Also, there is an open-coded XSync() in there, because this needs a round-trip
when cairo_surface_flush() is called on the xfer surface and I am too lazy to
implement this right now (cairo-x11 does this round-trip).

@match: Since you know gimp's code better, do you really need an ARGB32 surface
from gimp_display_xfer_get_surface()? Since nothing in
gimp_display_shell_render() draws some kind of "background" behind the ARGB32
surface, I guess that its content should always be opaque and a RGB24 surface
can be used instead.
(I didn't test if that change in gimp actually hides this problem nor have I
decided if it would be better to paper over this problem in gimp or have
something done in cairo-xcb.)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20130926/e61cb30c/attachment.html>


More information about the cairo-bugs mailing list