[gtk+/rendering-cleanup: 46/95] gdk: Remove _gdk_drawable_get_scratch_gc()



commit b5ef68118f539a04e98ee62351ee165b37cfdebe
Author: Benjamin Otte <otte redhat com>
Date:   Tue Jul 20 02:25:09 2010 +0200

    gdk: Remove _gdk_drawable_get_scratch_gc()
    
    The function is unused now.

 gdk/gdkdraw.c      |   59 ----------------------------------------------------
 gdk/gdkinternals.h |    2 -
 gdk/gdkscreen.c    |   12 ++--------
 gdk/gdkscreen.h    |    2 -
 4 files changed, 3 insertions(+), 72 deletions(-)
---
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c
index 90b44ba..bb95185 100644
--- a/gdk/gdkdraw.c
+++ b/gdk/gdkdraw.c
@@ -424,65 +424,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
  * 
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 157f8a0..2a6c5d4 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -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,
diff --git a/gdk/gdkscreen.c b/gdk/gdkscreen.c
index c403a41..174c0d5 100644
--- a/gdk/gdkscreen.c
+++ b/gdk/gdkscreen.c
@@ -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;
         }
     }
 
diff --git a/gdk/gdkscreen.h b/gdk/gdkscreen.h
index ac6834a..544b430 100644
--- a/gdk/gdkscreen.h
+++ b/gdk/gdkscreen.h
@@ -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);



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