Re: [gtk-list] Speeding things up.
- From: Paul Barton-Davis <pbd op net>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Speeding things up.
- Date: Sun, 21 Mar 1999 09:56:29 -0500
In message <Pine.GSO.4.00.9903211418290.8227-100000@orff-5>you write:
>As we know, loading pixmaps is more than slow...
>When using Xlib, you could allways speed things up by combine all pixmaps
>to one big, load it and split it.
>
>Does gtk/gdk provide functions for this type ofa manipulation?
just use the regular pixmap functions, but when you draw it, use
gdk_pixmap_draw() with relevant offsets and sizes into the pixmap. You
get to specify where the src pixmap should be considered to begin, and
how big it is. There's a program called "gsyn" which does this, for
example: its "knobs" are pixmaps containing 32 different images of the
knob in various states of rotation, and it just calls
gdk_pixmap_draw() with the appropriate offsets (the size of each
section is known ahead of time).
this raises a question of my own: how much overhead is there in the
server when you load N pixmaps instead of 1 pixmap that contains as
many pixels as all N combined ?
i ask this because i have my own "knobs" (see
http://www.op.net/~pbd/quasimodo/) which I manage as a set of pixmaps,
instead of using the "section-within-a-pixmap" approach, and I'm
wondering how much server memory/processing overhead i incur doing
things this way.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]