Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible speedup in draw() (crossfire0.8) (fwd)
- To: crossfire (at) ifi.uio.no
- Subject: Re: Possible speedup in draw() (crossfire0.8) (fwd)
- From: Morten Hanshaugen <>
- Date: Thu, 2 Jul 1992 17:56:26 +0200
- In-Reply-To: Skud the Great <>'s message of Wed, 1 Jul 92 14:58:06 PDT
- References: <>
> At present there are 13 colors including black and white, what you are
> purposing is to create 169 GCs
No, just 156 (n*n-n).
> I am relatively new to X windows, so I have one question: How much memory will
> be required to define 169 GCs??, Also consider that colors may be added, which
> would require yet more GCs to be defined.
The GC is defined like this (look at XLib.h):
typedef struct _XGC {
XExtData *ext_data; /* hook for extension to hang data */
GContext gid; /* protocol ID for graphics context */
Bool rects; /* boolean: TRUE if clipmask is list of rectangles */
Bool dashes; /* boolean: TRUE if dash-list is really a list */
unsigned long dirty;/* cache dirty bits */
XGCValues values; /* shadow structure of values */
} *GC;
The size of the GC struct looks like some 200 bytes, and 13 colours would
give some 32 K extra. 64 colours would give ca. 800 K if I am not wrong?
No problem with 13 colors, but 64, I don't know. Test it out.
Morten