[cairo] Re: Lander Game

Carl Worth cworth at cworth.org
Thu Jan 25 16:21:45 PST 2007


On Thu, 25 Jan 2007 23:50:41 +0000, "Alex Mac" wrote:
> I've revamped the whole app now and release 0.2.1 now caches the
> background and the ship. Also I've stopped it from updating the whole
> screen every frame.

Yes, much nicer. (Though Owen's point still stands that it would be
nice to have the whole cairo/Render/X driver stack "finished" and
taking full advantage of video card capabilities so that no caching
would even be necessary here.)

> try running 0.2.1 and then run it again with "--native-surfaces" this
> causes the background to be cached as an xlib surface rather than an
> image surface. Although not as noticeable now the xlib surface does
> cause the occasional jerk... I'll try and get a test to replicate it
> properly

OK, so we're seeing different behavior. My (extremely unscientific)
investigation suggests less jerkiness with --native-surfaces. Here are
some numbers (as reported by the program itself and top):

without --native-surfaces: 70 fps (python: 50% CPU, X: 40% CPU)
  with --natives-surfaces: 80 fps (python: 50% CPU, X: 15% CPU)

It looks like a lot of the client-side CPU usage left is with
cairo_stroke computing those cute little thrust circles over and over
again.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070125/81b8864b/attachment.pgp


More information about the cairo mailing list