[Xcb] Drawing a 32-bit bitmap quickly
Peter Harris
peter.harris at hummingbird.com
Mon Nov 17 08:04:11 PST 2008
Adam Langley wrote:
> I have an application which would like to draw a 32-bit bitmap (ARGB,
> pre-multiplied alpha) using shared memory where possible.
>
> I can happily paint a 24-bit shared memory segment with XCB (the root
> window is 24-bits deep). However, even though there is a 32-bit visual
> and 32-bits is a supported depth for the screen, I cannot create a
> 32-bit deep window. I always get a BadMatch error no matter which
> combination of arguments I try. The XLib programming manual suggests
> that child windows don't have to be the same depth as their parents.
> Is that true?
True. Without seeing your code, I cannot be sure what you are doing
wrong. The most common reason I get a BadMatch is forgetting to create
(and use) a new Colormap with the new visual.
> If it so, how should I go about it? Can I use the Xrender extension?
That's what I would do. The RENDER extension may be available even when
a 32-bit visual is not.
Peter Harris
--
Hummingbird Connectivity - A Division of Open Text
Peter Harris http://connectivity.hummingbird.com
Research and Development Phone: +1 905 762 6001
peter.harris at hummingbird.com Toll Free: 1 877 359 4866
More information about the Xcb
mailing list