Redo Xft support to go directly to Picture objects instead of using

Mon Nov  5 12:46:44 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkdrawable-x11.[ch] gdk/x11/gdkgc-x11.c
	gdk/x11/gdkpixmap-x11.c gdk/x11/gdkprivate-x11.h
	gdk/x11/gdkwindow-x11.c: Redo Xft support to go
	directly to Picture objects instead of using XftDraw.
	This fixes the problem where we weren't able to
	properly destroy XftDraw objects before destroying
	the accompanying windows, and probably improves
	efficiency a bit too. (#50214)
This commit is contained in:
Owen Taylor
2001-11-05 17:48:58 +00:00
committed by Owen Taylor
parent 8a31888a04
commit 42634ee735
13 changed files with 282 additions and 77 deletions

View File

@ -39,6 +39,10 @@
#include <config.h>
#if HAVE_XFT
#include <X11/extensions/Xrender.h>
#endif
#define GDK_TYPE_GC_X11 (_gdk_gc_x11_get_type ())
#define GDK_GC_X11(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_GC_X11, GdkGCX11))
#define GDK_GC_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_GC_X11, GdkGCX11Class))
@ -60,10 +64,10 @@ struct _GdkGCX11
GdkRegion *clip_region;
guint dirty_mask;
/* We can't conditionalize on HAVE_XFT here, so we simply always
* have this here as a gpointer.
*/
gpointer xft_draw;
#ifdef HAVE_XFT
Picture fg_picture;
XRenderColor fg_picture_color;
#endif
gulong fg_pixel;
};
@ -95,6 +99,10 @@ gint gdk_send_xevent (Window window,
GType _gdk_gc_x11_get_type (void);
#ifdef HAVE_XFT
Picture _gdk_x11_gc_get_fg_picture (GdkGC *gc);
#endif /* HAVE_XFT */
GdkGC *_gdk_x11_gc_new (GdkDrawable *drawable,
GdkGCValues *values,
GdkGCValuesMask values_mask);