gdk_pixbuf_xlib_render_threshold_alpha renders using lines that are not pixel-perfect
Submitted by Michal Srb
The gdk_pixbuf_xlib_render_threshold_alpha renders mask by creating empty drawable, filling it with black and then drawing white horizontal lines for every continuous line of non-transparent pixels.
Apart from being ineffective it doesn't produce reliable results when the resulting mask is 1 pixel wide: It attempts to render lines from point (0,y) to point (0,y). Such lines are sometimes rendered as one pixel (what gdk-pixbug expects), sometimes as nothing. Depending of current backend in X server. (For example software rendering in Xephyr or Xvnc doesn't draw anything, accelerated with e.g. nouveau draw one pixel.)
I filled a bug about this inconsistency in X server: https://bugs.freedesktop.org/show_bug.cgi?id=75720
However it may stay as it is because AFAIK there is no exact behavior specified for these 0-width lines. So they don't guarantee pixel-perfect rendering and shouldn't be used for such task.
Creating mask in memory and then uploading with XPutImage would be faster and safer.
This problem affects icewm - it uses 1px wide pictures with transparency for title bars in some standard themes. This bug makes them completely transparent.
Version: git master