<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - GIMP image rendering is broken with --enable-xlib-xcb"
href="https://bugs.freedesktop.org/show_bug.cgi?id=67505#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - GIMP image rendering is broken with --enable-xlib-xcb"
href="https://bugs.freedesktop.org/show_bug.cgi?id=67505">bug 67505</a>
from <span class="vcard"><a class="email" href="mailto:psychon@znc.in" title="Uli Schlachter <psychon@znc.in>"> <span class="fn">Uli Schlachter</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=86655" name="attach_86655" title="Use same fix in cairo-xcb as in cairo-xlib">attachment 86655</a> <a href="attachment.cgi?id=86655&action=edit" title="Use same fix in cairo-xcb as in cairo-xlib">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=67505&attachment=86655'>[review]</a>
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.)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>