Re: [gtk-list] Re: Could GdkRgb solve my pixmap speed problem ?




Havoc Pennington <hp@redhat.com> writes:

> Arndt Schwaiger <arsc0001@stud.uni-sb.de> writes:
> > 
> > I read something about GdkRgb and my question is:
> > Can I perhaps copy with GdkRgb my 32 x 32 pixels pixmaps faster than
> > with GTK copy pixmap ?
> 
> Yes, copying from an RGB array into another RGB array on the client
> side should be faster than sending the X request to copy the pixmaps.
> However, the overall screen update time may or may not be better.

Actually, my guess is that if all the pixmaps are already on
the server, then the X requests will be as fast as faster.

Here's one quick sketch of a pretty fast and easy to implement
design:

 Create a pixmap as large as the visible area of the window. Set this
 window as the background pixmap for the drawing area using 
 gdk_window_set_back_pixmap().

 To scroll, copy the area that remains visisble into its new location
 using gdk_draw_pixmap(), then redraw the newly visible edges.

 Then update the screen by calling gdk_window_clear().

Its even faster to scroll the screen directly  - but there
are a lot of things you have to be careful of in that case,
and hopefully the above is fast enough.

Regards,
                                        Owen

(GTK+-1.4 will make this a lot easier - you will get very good
performing and good looking scrolling by just using a big
drawing area and putting it into a viewport.)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]