Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] Re: Render speed test with imlib/xrender/sdl/pixbuf/ftwl
Home

[Freeciv-Dev] Re: Render speed test with imlib/xrender/sdl/pixbuf/ftwl

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv-Dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Render speed test with imlib/xrender/sdl/pixbuf/ftwl
From: Jason Dorje Short <jdorje@xxxxxxxxxxxx>
Date: Mon, 21 Mar 2005 16:24:54 -0500

Raimar Falke wrote:

Also note that I can only say that ftwl is used correctly. Please
suggest any other improvements of the usage of the other libs.

Note that most (99%) of our graphics don't use alpha. And with some tilesets (speciallly designed for older computers or for gui-xaw) no graphics use alpha. For graphics without alpha drawing is much faster. For instance with gdk2 I measure drawing with pixmap+mask to be 4x faster than drawing with pixbufs. So the current method in the gtk2 client uses pixmap+mask for all sprites that don't use alpha, and pixbuf for those that do.

This is a reason why cairo xlib drawing is slow also. They use xrender even when there is just a 1-bit mask. I consider this a bug in cairo (although because of cairo's design it is fixable, whereas with gdkpixbuf the problem is unfixable). It's probably also a bug in xrender, which should try to use the fast drawing if possible.

Summary: use server-side drawing where possible, client-side drawing where necessary. Design the interface so that this may happen transparently in the backend.

-jason



[Prev in Thread] Current Thread [Next in Thread]