[Nautilus-list] Eel background speedup patch



This patch fixes some bad performance with EelBackground where it renders
the whole widget area even when only a small rectangle was exposed.

This patch, and the exposure compression patch I sent to gtk-devel-list
(will check it in later today) makes redrawing of the sidebar a whole lot
faster.

So, Can i check this in?

/ Alex

Index: eel-background.c
===================================================================
RCS file: /cvs/gnome/eel/eel/eel-background.c,v
retrieving revision 1.4
diff -u -p -r1.4 eel-background.c
--- eel-background.c	2001/04/04 07:51:33	1.4
+++ eel-background.c	2001/06/01 22:34:59
@@ -592,7 +592,7 @@ eel_background_draw (EelBackground *back
 			eel_background_draw_aa (background, &buffer);
 			gdk_pixbuf_render_to_drawable (pixbuf, drawable, gc,
 						       0, 0,
-						       x, y,
+						       x_canvas, y_canvas,
 						       width, height,
 						       GDK_RGB_DITHER_MAX, x_canvas, y_canvas);
 		}
@@ -1003,7 +1003,16 @@ eel_background_draw_flat_box (GtkStyle *

 	eel_gdk_window_update_sizes (window, &width, &height);

-	eel_background_draw_to_drawable (background, window, gc, 0, 0, width, height, widget->allocation.width, widget->allocation.height);
+	if (area)
+		eel_background_draw_to_drawable (background, window, gc,
+						 area->x, area->y,
+						 area->width, area->height,
+						 widget->allocation.width, widget->allocation.height);
+	else
+		eel_background_draw_to_drawable (background, window, gc,
+						 0, 0,
+						 width, height,
+						 widget->allocation.width, widget->allocation.height);
 	if (area)
 		gdk_gc_set_clip_rectangle (gc, NULL);
 }






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