Re: can i have full alpha channel at client side?



Paul Pogonyshev wrote:

Olexiy Avramchenko wrote:
As far as i know, pixbufs are server-side objects and should therefore
be quite slow.  Is there a way to get a client-side analog of a pixbuf
with full alpha channel (eight bits)?  I was only able to find how to
generate 1 bit client-side alpha, which doesn't suffice for me.
Its client-side. You can obtain the pointer to pixbuf's data via
gdk_pixbuf_get_pixels().
I think i got confused about X architecture.  Now it seems that the server
is always local for the user who runs an application, while the client might
be remote, if the application is run on a remote machine, right?  It's just
common that the server is "there" while it's client is "here", but for an X
application it seems logical to be the way round.

Server-side objects are stored in server-process memory. Client-side objects stored in memory of
the client process.
Server is local only when it runs on the same box as client. In all other cases server is remote
[from the client application point of view].
Local server gives an advantage - shared objects - that live in shared memory segments and
thus accessible both from X server and client (XShm extension).

If the things are like that, i have to rephrase: since pixbufs are client-
side, they must be slow (i.e. they need to be transferred to the server for
rendering).  So, is there a way to have something with full alpha, but at
the server?

Core X protocol knows nothing about alpha-channel:
http://keithp.com/~keithp/talks/usenix2000/render.html
XRender extension takes care of compositing images in modern X servers.

After all, i don't care a lot about architecture.  I create images with full
alpha channel and then draw them constantly.  I don't need access to their
pixels after they have been created.  So, what do i use, pixbufs or something
else, to preserve full alpha and render as fast as possible?

GDK code that renders pixbufs with alpha channel use XRender and XShm (if server has such extensions and if your application runs locally). I beleive that significant speedup can be achieved by deep hacks or
handling special cases. So I suggent you just use pixbufs :)

   Olexiy





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]