]> Pileus Git - ~andy/gtk/commitdiff
gdk: Remove _gdk_drawable_get_scratch_gc()
authorBenjamin Otte <otte@redhat.com>
Tue, 20 Jul 2010 00:25:09 +0000 (02:25 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 10 Aug 2010 19:02:28 +0000 (21:02 +0200)
The function is unused now.

gdk/gdkdraw.c
gdk/gdkinternals.h
gdk/gdkscreen.c
gdk/gdkscreen.h

index 90b44ba1767e2169f729bc729128383006977cde..bb951851388b7ec7332384527a01b25998a58ed8 100644 (file)
@@ -423,65 +423,6 @@ gdk_drawable_real_draw_drawable (GdkDrawable  *drawable,
 
 /************************************************************************/
 
-/**
- * _gdk_drawable_get_scratch_gc:
- * @drawable: A #GdkDrawable
- * @graphics_exposures: Whether the returned #GdkGC should generate graphics exposures 
- * 
- * Returns a #GdkGC suitable for drawing on @drawable. The #GdkGC has
- * the standard values for @drawable, except for the graphics_exposures
- * field which is determined by the @graphics_exposures parameter.
- *
- * The foreground color of the returned #GdkGC is undefined. The #GdkGC
- * must not be altered in any way, except to change its foreground color.
- * 
- * Return value: A #GdkGC suitable for drawing on @drawable
- * 
- * Since: 2.4
- **/
-GdkGC *
-_gdk_drawable_get_scratch_gc (GdkDrawable *drawable,
-                             gboolean     graphics_exposures)
-{
-  GdkScreen *screen;
-  gint depth;
-
-  g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);
-
-  screen = gdk_drawable_get_screen (drawable);
-
-  g_return_val_if_fail (!screen->closed, NULL);
-
-  depth = gdk_drawable_get_depth (drawable) - 1;
-
-  if (graphics_exposures)
-    {
-      if (!screen->exposure_gcs[depth])
-       {
-         GdkGCValues values;
-         GdkGCValuesMask mask;
-
-         values.graphics_exposures = TRUE;
-         mask = GDK_GC_EXPOSURES;  
-
-         screen->exposure_gcs[depth] =
-           gdk_gc_new_with_values (drawable, &values, mask);
-       }
-
-      return screen->exposure_gcs[depth];
-    }
-  else
-    {
-      if (!screen->normal_gcs[depth])
-       {
-         screen->normal_gcs[depth] =
-           gdk_gc_new (drawable);
-       }
-
-      return screen->normal_gcs[depth];
-    }
-}
-
 /**
  * _gdk_drawable_get_subwindow_scratch_gc:
  * @drawable: A #GdkDrawable
index 157f8a09b1516abd34ecad5c54168c0ee99e56c6..2a6c5d42fa3418153380a69cc18719050a739b75 100644 (file)
@@ -325,8 +325,6 @@ cairo_surface_t * _gdk_drawable_create_cairo_surface (GdkDrawable *drawable,
                                                      int height);
 
 /* GC caching */
-GdkGC *_gdk_drawable_get_scratch_gc (GdkDrawable *drawable,
-                                    gboolean     graphics_exposures);
 GdkGC *_gdk_drawable_get_subwindow_scratch_gc (GdkDrawable *drawable);
 
 void _gdk_gc_update_context (GdkGC          *gc,
index c403a41dc2eb1db3b8e58b03e9a5cec54116971a..174c0d58c9ec6221b5d188aa0b4570d84ac32538 100644 (file)
@@ -163,16 +163,10 @@ gdk_screen_dispose (GObject *object)
 
   for (i = 0; i < 32; ++i)
     {
-      if (screen->exposure_gcs[i])
+      if (screen->subwindow_gcs[i])
         {
-          g_object_unref (screen->exposure_gcs[i]);
-          screen->exposure_gcs[i] = NULL;
-        }
-
-      if (screen->normal_gcs[i])
-        {
-          g_object_unref (screen->normal_gcs[i]);
-          screen->normal_gcs[i] = NULL;
+          g_object_unref (screen->subwindow_gcs[i]);
+          screen->subwindow_gcs[i] = NULL;
         }
     }
 
index ac6834ac12dfc5b83c1415f15d2a63012a9485a5..544b430f255a37980e5cdd28c97fe3c56e91703f 100644 (file)
@@ -49,8 +49,6 @@ struct _GdkScreen
 
   guint GSEAL (closed) : 1;
 
-  GdkGC *GSEAL (normal_gcs[32]);
-  GdkGC *GSEAL (exposure_gcs[32]);
   GdkGC *GSEAL (subwindow_gcs[32]);
 
   cairo_font_options_t *GSEAL (font_options);