Documentation?

McDonald, Michael-p7438c Michael.McDonald at gdc4s.com
Tue Apr 7 16:53:35 PDT 2009


 

> -----Original Message-----
> From: xorg-bounces at lists.freedesktop.org 
> [mailto:xorg-bounces at lists.freedesktop.org] On Behalf Of Mark Wagner
> Sent: Tuesday, April 07, 2009 4:15 PM
> To: Peter Harris
> Cc: xorg at lists.freedesktop.org
> Subject: Re: Documentation?
> 
> On Tue, Apr 7, 2009 at 15:37, Peter Harris 
> <pharris at opentext.com> wrote:
> > Mark Wagner wrote:
> >>
> >>, such as drawing images?  One of the big things I
> >> need to update is the toolkit's image-handling code: right now, a
> >> simple JPEG splashscreen takes seven seconds to draw.

> I believe the slow part is a million calls to XAllocColor(). 

Ahh, that's what's going on in my code I wrote last week. I was writing a quick demo program using Xaw and tried to use the display list stuff to load a XPM image into some of the label widgets. In my case, one image takes approximately 20 seconds while the second image takes over a minute! The worked fast once they were used once.

I gave up and wrote some code to load a PPM image into a Pixmap. Took about 30 minutes to write. There is no noticable delay in loading either image now. Of course I'm cheating. I have 24bit images going into a 24bit true color visual.

Anyway, if you can control the image format that's being loaded, don't be scared off from rolling your own code.

Mike McDonald



More information about the xorg mailing list