I found this thread in the archives.  Keith Packard posted two separate
messages I copied below.

We are trying to do what Jonathan Bian describes below: use Render to
modify the alpha channel in a ARGB 8888 frame buffer.  From my
understanding our v4.2.0 XFree86 uses "fbdev" to access the frame
buffer.  (Sorry that I'm uncertain about this; the guy who did the work
is no longer here.) We also use "Tiny X" which I believe means there is
no XF86Config file.  fbdev seems to expose only 24 bit depth windows.
How can I make fbdev expose 32 bit windows?  I don't believe I care if
there are then no longer 24 bit windows available.

We want to try to make the sample program that Jonathan Bian posted work
with our X frame buffer. We are able to write the alpha byte of ARGB to
the frame buffer using standard Xlib e.g. we can set the alpha byte in
the GC foreground color, do a rect fill and get translucency.  We are
also able to get translucency using GTK 2 but we want to be able to use
Render, in particular for anti-aliased fonts.

A separate issue: from Keith's discussion I assume that Render uses the
DDX equivalent of Get/PutImage to read and write the frame buffer (or
whatever XAA now has; I worked on other X servers but not on XFree86).
The windows needs to be 32 bit or else Get/PutImage will read and write
only 24 bits per pixels.  Is this true?

Thanks,
Peter Kaczowka



===================================
Around 11 o'clock on Jun 4, "Bian, Jonathan" wrote:

> Hi, I am trying to find out whether I can use Render to modify the
alpha
> channel in a frame buffer that's in ARGB 8888 format.   I modified
Keith's
> sample code slightly to render a red rectangle into the frame buffer
with
> the destination alpha set to 0x80.  But I get 0x00FF0000 in the frame
buffer
> instead of the desired 0x80FF0000.

You'll need to create a window of depth 32 instead of depth 24 -- depth
24
windows don't have any place to store the alpha value.  That requires
that
the driver expose depth 32 windows, which is probably not the case
currently.

You can try the rest of the code by using a depth 32 pixmap to make sure

your understanding of the rendering operations is accurate; we do need
to
go whack the server to expose depth 32 windows where possible.

Keith Packard        XFree86 Core Team        HP Cambridge Research Lab


===========================================
Around 14 o'clock on Jun 4, "Bian, Jonathan" wrote:

> Thanks Keith. This makes a lot more sense to me now.  Say if I go
ahead
> modifying the driver to expose depth 32 windows, do you think the
current
> XFree86 server is capable of handling this or some additional work is
> required?

Most of the current server is quite capable of handling depth 32
windows,
I'm less sure of the XFree86 driver infrastructure which hasn't seen
quite
the level of hardware variety that the rest of the server has.

You'll want to advertise both depth 24 and depth 32 windows, both at
32bpp.

What we should probably do is make this a common feature of 32bpp
hardware
so that all of the drivers could advertise this.

Keith Packard        XFree86 Core Team        HP Cambridge Research Lab




_______________________________________________
Render mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/render

Reply via email to