Commit 3fc31e88 authored by Benjamin Otte's avatar Benjamin Otte

gdk: Remove _gdk_drawable_get_scratch_gc()

The function is unused now.
parent db5fc437
......@@ -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
......
......@@ -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,
......
......@@ -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;
}
}
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment