From 1c51c48606930b3a784c0bbc99a5a8eb2188ca5f Mon Sep 17 00:00:00 2001 From: Soeren Sandmann Date: Wed, 18 Feb 2004 00:59:14 +0000 Subject: GC caching, bug #125645 (based on patch by Brian Cameron) Wed Feb 18 01:44:59 2004 Soeren Sandmann GC caching, bug #125645 (based on patch by Brian Cameron) * gdk/gdkscreen.h (struct _GdkScreen): Add GC cache * gdk/gdkscreen.c (gdk_screen_dispose): New function. Unref the cached GC's here. * gdk/gdkdraw.c (_gdk_drawable_get_scratch_gc): New function to get a scratch gc. * gdk/gdkinternals.h: Declare the function here * gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Use _gdk_drawable_get_scratch_gc() instead of creating a new GC. * gdk/x11/gdkgeometry-x11.c (gdk_window_copy_area_scroll): same * gdk/x11/gdkdrawable-x11.c (draw_with_images): same * gdk/gdkwindow.c (gdk_window_get_composite_drawable): same * gdk/gdkwindow.c (gdk_window_end_paint): same * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): same * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_threshold_alpha): same * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_pixmap_and_mask_for_colormap): same --- gdk/gdkinternals.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdk/gdkinternals.h') diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h index 45c6e1c327..6f4c539424 100644 --- a/gdk/gdkinternals.h +++ b/gdk/gdkinternals.h @@ -210,6 +210,10 @@ GdkImage *_gdk_drawable_copy_to_image (GdkDrawable *drawable, gint width, gint height); +/* GC caching */ +GdkGC *_gdk_drawable_get_scratch_gc (GdkDrawable *drawable, + gboolean graphics_exposures); + /************************************* * Interfaces used by windowing code * *************************************/ -- cgit v1.2.1