Skip to content
Commit 34c49b24 authored by Thomas Lübking's avatar Thomas Lübking
Browse files

simplify format selection, make 24bit rgb32

an image w/o alphachannel is certainly not
premultiplied

the findFormat() made not much sense at all
it was only used if the image depth was
the default depth and then looked up supported
16, 24 and 32 bit formats

However 32 bit images were handled before
unconditionally so this was only relevant for
16 bit images (where we supported either 5-6-5
or nothing) or 24bit images, where a false value
(ARGB_premultiplied implies 32bit) was returned.

IOW: for the majority of images (32bit) this was
not used, for 24bpp displays we got a falsely
colored images and for 16bpp either a correctly
colored (for 5-6-5 layouts) or no image at all
(for 5-5-5 or [4-]4-4-4 layouts)

I don't know whether 16bpp w/ 5-5-5 or 4-4-4 itw.,
but better show them miscolored images (and trigger
a bug) than none.
If there're funky 24bpp servers (other than 8-8-8)
somebody shall please report a bug to us.

Possible TODO:
add a single call to test the server layout (channel
masks) and yell an error if there's something "strange"

BUG: 340348
parent 9dbb47b0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment