BUG with 32bpp depth visual on 16bpp device
Petr Cvek
petrcvekcz at gmail.com
Thu Nov 30 01:40:26 UTC 2017
Hello,
I've observed a weird/possible bug behavior on 16bpp display.
I'm trying to modify flaxpdf (FLTK based) PDF viewer to work on 16bpp.
It uses xrender for bitmap resizing, which works only for 24+bpp color
modes. However the X screen on 16bpp machine seems to support some
virtual visual with 32 depth.
Problem is when I try to set 32bpp in the fltk by calling:
Fl::visual(FL_RGB8);
the application starts, but all widgets are black and white.
Debugging this I wrote my own simple X window application, which uses
32bpp visual and it behaves in a same way as FLTK. This means a
definition of blue pixels with min to max intensity makes an incomplete
green gradient on LCD, definition of green min to max makes green
striped with red gradients and definition of blue min to max makes
constant full white (there is no way to make blue color in depth == 32).
The relevant visual definition from xdpyinfo:
default visual id: 0x21
visual:
visual id: 0x21
class: TrueColor
depth: 16 planes
available colormap entries: 64 per subfield
red, green, blue masks: 0xf800, 0x7e0, 0x1f
significant bits in color specification: 8 bits
visual:
visual id: 0x41
class: TrueColor
depth: 32 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
Maybe I'm making some mistakes in the colormap allocation? But the same
code (along with flaxpdf) works without a problem on my Radeon RX460 GPU
(non default visual):
visual:
visual id: 0x62
class: TrueColor
depth: 32 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
The 16bpp device is just dumb fbdev, so any 32bpp to 16bpp
transformations must be done somewhere in the X server. Do you have some
hints where to begin? (i'm using X.Org X Server 1.19.5 from development
tree of buildroot)
best regards,
Petr
More information about the xorg
mailing list