Re: Understanding gtk_widget_queue_draw() (and dbl buffing)



Derek Simkowiak <dereks@kd-dev.com> writes:
> 	gtk_widget_queue_draw() does not double buffer, does it?  
>

No. It simply schedules a draw to happen in an idle handler.
 
> 	So, assuming my understanding is correct, the only advantage of
> using widget_queue_draw() is that it's less network intensive, because
> there are fewer expose events actually sent to the X server. 

The main advantage is that you only draw once, which means it's faster
and flickers less, and code can queue_draw without worrying about who
else is queuing a draw.
 
> 	I'm working on a new widget (the View for my text widget), and I'm
> wondering if I need to do double buffering myself.  I've seen some
> messages indicated that Gtk 1.4 would have built-in double buffering,
> whatever that means.
>

It means you don't need to do double buffering. ;-)
 
> 	Should I write my widget to do its own double buffering?  If so, I

Nope.

Havoc




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