[Xcb] xcb flame, for fun
Vincent Torri
Vincent.Torri at iecn.u-nancy.fr
Mon Jan 2 07:04:01 PST 2006
It's in cvs
i've also added some code to set the title of a window.
feel free to fix the code, and optimize it
one of the optimizations that I wanted to do was to not use the XCBImage
stuff, but directly use XCBGetImage and XCBPutImage and wirting in the
memory directly. But i've not succeeded
Vincent
On Sun, 1 Jan 2006, Barton C Massey wrote:
> Yes, of course include in the demos! Great work---looks
> pretty, and demonstrates that a port of an Xlib app needn't
> be *too* onerous. Passes -O4 -Wall, which is nice.
>
> Thanks much for doing this!
>
> Bart
>
> P.S. If you want an easy fix, rename powerof() to ilog2()
> or somesuch. That function returns the floor of the log
> base 2 of its argument. Also, since it's not use in an
> inner loop, let's use a simpler algorithm. Even if it was,
> the iterated-if-test code can't be fast on a modern
> machine, and it doesn't exit early, so...
>
> int
> ilog2 (unsigned int n)
> {
> int p = -1;
> assert(n > 0);
> while(n > 0) {
> p++;
> n >>= 1;
> }
> return p;
> }
>
> There are faster ways, but this one is good for this code.
>
>
> In message <Pine.LNX.4.51.0512311228230.6754 at cartan.iecn.u-nancy.fr> you wrote:
> > This message is in MIME format. The first part should be readable text,
> > while the remaining parts are likely unreadable without MIME-aware tools.
> > Send mail to mime at docserver.cac.washington.edu for more info.
> >
> > --851511594-1261939651-1136028764=:6754
> > Content-Type: TEXT/PLAIN; charset=US-ASCII
> >
> >
> > hey,
> >
> > i was playing with xcb and xflames. Here is xcb flame :)
> >
> > do you think it's interesting to put it in xcb-demo/test ? The prog needs
> > some love, but it should work (in particular, it's not optimized at all,
> > it does not use mit shm, i think that there are some unneeded variables,
> > etc...)
> >
> > Vincent
> > --851511594-1261939651-1136028764=:6754
> > Content-Type: TEXT/x-csrc; name="xcb_flame.c"
> > Content-Transfer-Encoding: BASE64
> > Content-ID: <Pine.LNX.4.51.0512311232440.6754 at cartan.iecn.u-nancy.fr>
> > Content-Description:
> > Content-Disposition: attachment; filename="xcb_flame.c"
> >
> > LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
> > KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KLyogICAgICAg
> > ICAgICAgICAgICAgICAgICAgICAgICAgICAgWENCRmxhbWUgICAgICAgICAg
> > ICAgICAgICAgICAgICAgICAgICAgICAqLw0KLyoqKioqKioqKioqKioqKioq
>
More information about the Xcb
mailing list