diff options
author | Soeren Sandmann <sandmann@daimi.au.dk> | 2004-02-18 00:59:14 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2004-02-18 00:59:14 +0000 |
commit | 1c51c48606930b3a784c0bbc99a5a8eb2188ca5f (patch) | |
tree | a8ae2772d178953d6f9c2cd996eaa1f1a63f87f2 /gdk/gdkpixmap.c | |
parent | b3013744c5fb3deb8d2e292f300fc54fc710dc85 (diff) | |
download | gtk+-1c51c48606930b3a784c0bbc99a5a8eb2188ca5f.tar.gz |
GC caching, bug #125645 (based on patch by Brian Cameron)
Wed Feb 18 01:44:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
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
Diffstat (limited to 'gdk/gdkpixmap.c')
-rw-r--r-- | gdk/gdkpixmap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c index efc9763086..2392776350 100644 --- a/gdk/gdkpixmap.c +++ b/gdk/gdkpixmap.c @@ -529,12 +529,11 @@ gdk_pixmap_colormap_new_from_pixbuf (GdkColormap *colormap, else render_pixbuf = pixbuf; - tmp_gc = gdk_gc_new (pixmap); + tmp_gc = _gdk_drawable_get_scratch_gc (pixmap, FALSE); gdk_draw_pixbuf (pixmap, tmp_gc, render_pixbuf, 0, 0, 0, 0, gdk_pixbuf_get_width (render_pixbuf), gdk_pixbuf_get_height (render_pixbuf), GDK_RGB_DITHER_NORMAL, 0, 0); - g_object_unref (tmp_gc); if (render_pixbuf != pixbuf) g_object_unref (render_pixbuf); |