? x
? xshmperf1
? xshmperf2
? tests/testrichtext
Index: gdk/gdkdraw.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkdraw.c,v
retrieving revision 1.65
diff -u -p -r1.65 gdkdraw.c
--- gdk/gdkdraw.c	14 May 2006 03:58:05 -0000	1.65
+++ gdk/gdkdraw.c	29 Sep 2006 11:19:11 -0000
@@ -1561,6 +1561,9 @@ gdk_drawable_real_draw_pixbuf (GdkDrawab
        */
       if (composite_func && !(dither == GDK_RGB_DITHER_MAX && visual->depth != 24))
 	{
+
+#if 0
+
 	  gint x0, y0;
 	  for (y0 = 0; y0 < height; y0 += GDK_SCRATCH_IMAGE_HEIGHT)
 	    {
@@ -1591,7 +1594,30 @@ gdk_drawable_real_draw_pixbuf (GdkDrawab
 				  width1, height1);
 		}
 	    }
-	  
+
+#else
+
+  	  GdkImage *image;
+
+          image = _gdk_image_new_for_depth (gdk_drawable_get_screen (drawable),
+                                            GDK_IMAGE_NORMAL,
+                                            NULL, 
+                                            width, height,
+                                            gdk_drawable_get_depth (drawable));
+          gdk_drawable_copy_to_image (drawable, image, dest_x, dest_y,
+                                      0, 0, width, height);
+          (*composite_func) (pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 4,
+                             pixbuf->rowstride,
+                             (guchar*)image->mem,
+                             image->bpl,
+                             visual->byte_order,
+                             width, height);
+          gdk_draw_image (drawable, gc, image, 0, 0,	
+                          dest_x, dest_y, width, height);
+          
+          g_object_unref (image);
+
+#endif	  
 	  goto out;
 	}
       else
Index: gdk/gdkimage.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkimage.c,v
retrieving revision 1.38
diff -u -p -r1.38 gdkimage.c
--- gdk/gdkimage.c	12 Jan 2006 13:50:51 -0000	1.38
+++ gdk/gdkimage.c	29 Sep 2006 11:19:11 -0000
@@ -252,6 +252,7 @@ scratch_image_info_for_depth (GdkScreen 
   GSList *tmp_list;
   GdkScratchImageInfo *image_info;
   gint i;
+  gboolean allocated = FALSE;
 
   tmp_list = scratch_image_infos;
   while (tmp_list)
@@ -272,18 +273,21 @@ scratch_image_info_for_depth (GdkScreen 
                     G_CALLBACK (scratch_image_info_display_closed),
                     image_info);
 
+#if 0
   /* Try to allocate as few possible shared images */
   for (i=0; i < G_N_ELEMENTS (possible_n_images); i++)
     {
       if (allocate_scratch_images (image_info, possible_n_images[i], TRUE))
 	{
 	  image_info->n_images = possible_n_images[i];
+          allocated = TRUE;
 	  break;
 	}
     }
+#endif
 
   /* If that fails, just allocate N_REGIONS normal images */
-  if (i == G_N_ELEMENTS (possible_n_images))
+  if (!allocated)
     {
       allocate_scratch_images (image_info, N_REGIONS, FALSE);
       image_info->n_images = N_REGIONS;
