? x
? xshmperf2
? tests/testrichtext
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:14:15 -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];
-	  break;
+          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;
Index: gdk/x11/gdkdrawable-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkdrawable-x11.c,v
retrieving revision 1.62
diff -u -p -r1.62 gdkdrawable-x11.c
--- gdk/x11/gdkdrawable-x11.c	15 Aug 2006 17:05:00 -0000	1.62
+++ gdk/x11/gdkdrawable-x11.c	29 Sep 2006 11:14:15 -0000
@@ -1222,6 +1222,8 @@ draw_with_images (GdkDrawable       *dra
   
   pix_gc = _gdk_drawable_get_scratch_gc (pix, FALSE);
 
+#if 0
+
   for (y0 = 0; y0 < height; y0 += GDK_SCRATCH_IMAGE_HEIGHT)
     {
       gint height1 = MIN (height - y0, GDK_SCRATCH_IMAGE_HEIGHT);
@@ -1242,6 +1244,25 @@ draw_with_images (GdkDrawable       *dra
 			  image, xs0, ys0, x0, y0, width1, height1);
 	}
     }
+
+#else
+
+  image = _gdk_image_new_for_depth (screen,
+                                    GDK_IMAGE_NORMAL,
+                                    NULL,
+                                    width, height, 
+                                    32);
+  
+  _gdk_x11_convert_to_format (src_rgb, src_rowstride,
+                              (guchar *)image->mem, image->bpl,
+                              format_type, image->byte_order,
+                              width, height);
+
+  gdk_draw_image (pix, pix_gc, image, 0, 0, 0, 0, width, height);
+
+  g_object_unref (image);
+
+#endif
   
   XRenderComposite (xdisplay, PictOpOver, pict, mask, dest_pict, 
 		    0, 0, 0, 0, dest_x, dest_y, width, height);
@@ -1348,6 +1369,8 @@ draw_with_pixmaps (GdkDrawable       *dr
 
   dest_pict = gdk_x11_drawable_get_picture (drawable);
   
+#if 0
+
   for (y0 = 0; y0 < height; y0 += GDK_SCRATCH_IMAGE_HEIGHT)
     {
       gint height1 = MIN (height - y0, GDK_SCRATCH_IMAGE_HEIGHT);
@@ -1372,6 +1395,27 @@ draw_with_pixmaps (GdkDrawable       *dr
 			    width1, height1);
 	}
     }
+
+#else
+
+  image = _gdk_image_new_for_depth (GDK_DRAWABLE_IMPL_X11 (drawable)->screen,
+                                    GDK_IMAGE_NORMAL,
+                                    NULL, 
+                                    width, height, 32);
+  if (!get_shm_pixmap_for_image (xdisplay, image, format, mask_format, &pix, &pict, &mask))
+    return FALSE;
+
+  _gdk_x11_convert_to_format (src_rgb, src_rowstride,
+                              (guchar *)image->mem, image->bpl,
+                              format_type, image->byte_order,
+                              width, height);
+
+  XRenderComposite (xdisplay, PictOpOver, pict, mask, dest_pict,
+                    0, 0, 0, 0, dest_x, dest_y, width, height);
+
+  g_object_unref (image); 
+
+#endif
 
   return TRUE;
 }
