[Spice-devel] Pixel format handling with offscreen surfaces
Alexander Larsson
alexl at redhat.com
Fri Apr 23 08:04:57 PDT 2010
Ok. I just landed this. Its slighly different than what was in the mail.
We create the canvas for a specific type and additionally spice actually
uses that format for the canvas (rather than always using canvases in
32bit mode).
However, instead of a generic way to handle source-has-alpha it uses a
flag for DrawAlphaBlend only.
Additionally, we can't make all offscreen surfaces RGBA by default,
because blending into something like that which has alpha not initilized
means the 0 alpha bytes are interpreted like the destination is
transparent, giving black results. Also, i had to add some code that
checks that RGB32 bitmaps don't actually have alpha bytes set, because
otherwise e.g. updating a 32bit offscreen surface window from to the
client would cause that to get zeroed alpha, then blending from that
surface resulted in all black.
Anyway, with the latest of everything, including the win32 driver
everything works in XP for me, both in 16 and 32 bit guest bpp. And this
is with alpha blend from surface enabled in the win32 driver, so no more
black borders.
There was also some general x11 client fixes so that it now works on
16bit X displays and supports conversion between different canvas
bitdepths and X bitdepths.
Its a large change though, so I'm sure there will be something broken.
Please test this carefully.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl at redhat.com alexander.larsson at gmail.com
He's a Nobel prize-winning sweet-toothed cyborg on the hunt for the last
specimen of a great and near-mythical creature. She's a strong-willed goth
mercenary fleeing from a Satanic cult. They fight crime!
More information about the Spice-devel
mailing list