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 88662 - RENDER without depth 32 pixmaps
RENDER without depth 32 pixmaps
Status: RESOLVED NOTGNOME
Product: gtk+
Classification: Platform
Component: Backend: X11
2.0.x
Other other
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-07-19 23:22 UTC by Matthias Clasen
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Clasen 2002-07-19 23:22:56 UTC
The code for accelerated alpha compositing using the RENDER extension
in gdkdrawable-x11.c assumes that 32 is a supported pixmap depth,
since draw_with_images attempts to create depth 32 pixmap. While
recent XFree86 servers seem to always advertise depth 32 for pixmaps,
there are servers which do support the RENDER extension, but not depth
32 pixmaps, e.g. Xvfb as shipped with XFree 4.2. 

Now, Xvfb may not be a very serious server, but if RENDER support
spreads further, more examples may appear, and since the information
about supported pixmap depths is readily available, I'd say gdk should
do the right thing and ignore the RENDER extension if depth 32 pixmaps
are not available.

Trying to use RENDER on depth 8 or even depth 4 pixmaps is probably
not worth it.
Comment 1 Owen Taylor 2002-07-23 02:20:25 UTC
The RENDER spec requires a 8888 RGBA pcuture
format to be available. I'm not sure if that implies that it
requires a 32 pixmaps to be available, but it certainly
is highly pathological.

If there are broken servers out there and a quick fix woudl prevent
a crash... sure, it probably makes sense.
Comment 2 Keith Packard 2002-07-23 03:22:42 UTC
Render requires that depth 1, 4, 8, 24 and 32 bits be provided in the
server.  Servers without that compliment of depths are violating the
Render spec.  I'm not surprised that Xvfb is broken; as far as I know,
it has yet to be ported to fb from cfb.  I'll fix the Render code to
not advertise the extension if the necessary depths aren't available.
Comment 3 Matthias Clasen 2002-07-23 23:33:51 UTC
Keith, where exactly does the spec require this ? I see that
PictFormats of depth 32, 24, 8, 4 and 1 are required, and I see
that a PictFormat of depth 32 needs a bpp 32 pixmap format, but
couldn't that be a depth 24, bpp 32 pixmap format ? Or is CreatePicture
supposed to throw BadMatch if the depth of the Drawable doesn't equal
the depth of the PictFormat ?
Comment 4 Keith Packard 2002-07-24 00:51:39 UTC
"7. Standard PictFormats

The server must support a Direct PictFormat with 8 bits each of red,
green, blue and alpha as well as a Direct PictFormat with 8 bits of
red, green and blue and 0 bits of alpha.  The server must also support
Direct PictFormats with 1, 4 and 8 bits of alpha and 0 bits of r, g
and b."

The wording is a bit oblique, and not quite as constrained as I
outlined, but the one certain requirement is a depth 32 8888 ARGB
format.  It is allowed that the other formats might be held in pixels
larger than strictly necessary; I could be persueded that this
restriction be tightened to force depth 1, 4, 8 and 24 to be
explicitly supported.

"13. Extension Requests

CreatePicture

...

It is a Match error to specify a format with a different depth than
the drawable.  If the drawable is a Window then the Red, Green and
Blue masks must match those in the visual for the window else a Match
error is generated."
Comment 5 Matthias Clasen 2002-07-24 22:10:16 UTC
Ah, ok. I was missing the bit about matching the depth of the drawable
and the format when creating a picture. Nothing to do on the gdk side
then, I guess.