diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c index 90b44ba176..bb95185138 100644 --- a/gdk/gdkdraw.c +++ b/gdk/gdkdraw.c @@ -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 diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h index 157f8a09b1..2a6c5d42fa 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 c403a41dc2..174c0d58c9 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 ac6834ac12..544b430f25 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);