Re: Canvas redraw priority / speed



On Mon, 2002-08-12 at 13:59, ERDI Gergo wrote:
> While this may sound overly complicated, it was the only way to make the
> canvas preview super-smooth -- you can drag the mouse around as fast as
> you can, and the canvas is never lagging or jagged.

	Stopping jaggedness is extremely hard - and I believe a different
problem - since once we start rendering the view - the whole thing is
rendered at once - there are no idle cycles between re-rendering
portions of the canvas - we just hold off doing the paint until idle [
AFAIR ].

> So what kind of scheduling/flow should I implement to get smoothness
> again?

	Why is it that we are not using GDK_PRIORITY_REDRAW on the canvas ? it
seems to me that Nautilus / gnome-vfs is using g_idle_add for all it's
async callbacks [ mime sniffing, file contents etc. ], such that the
canvas re-draw is the same priority as all this longer term async stuff.

	Can that be right ? Should we do:

-               canvas->idle_id = gtk_idle_add (idle_handler, canvas);
+               canvas->idle_id = 
+                       g_idle_add_full (GDK_PRIORITY_DRAW,
+					 idle_handler, canvas, NULL);

	Or am I seeing things ? does that help you Gergo ?

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




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