From 81c9d969d31e178afb6f6cf79492c59908d4b812 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 21 May 2003 22:37:35 +0000 Subject: [PATCH] Use XftDrawSetClipRectangles(), since we're inside HAVE_XFT2 anyway. 2003-05-22 Matthias Clasen * gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_update_xft_clip): Use XftDrawSetClipRectangles(), since we're inside HAVE_XFT2 anyway. (#113476) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gdk/x11/gdkdrawable-x11.c | 20 -------------------- 6 files changed, 30 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index dda437ed6a..943681d27c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-05-22 Matthias Clasen + + * gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_update_xft_clip): + Use XftDrawSetClipRectangles(), since we're inside HAVE_XFT2 + anyway. (#113476) + Wed May 21 15:53:14 2003 Owen Taylor * gtk/gtkprogress.c (gtk_progress_set_format_string, diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index dda437ed6a..943681d27c 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2003-05-22 Matthias Clasen + + * gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_update_xft_clip): + Use XftDrawSetClipRectangles(), since we're inside HAVE_XFT2 + anyway. (#113476) + Wed May 21 15:53:14 2003 Owen Taylor * gtk/gtkprogress.c (gtk_progress_set_format_string, diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index dda437ed6a..943681d27c 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2003-05-22 Matthias Clasen + + * gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_update_xft_clip): + Use XftDrawSetClipRectangles(), since we're inside HAVE_XFT2 + anyway. (#113476) + Wed May 21 15:53:14 2003 Owen Taylor * gtk/gtkprogress.c (gtk_progress_set_format_string, diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index dda437ed6a..943681d27c 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2003-05-22 Matthias Clasen + + * gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_update_xft_clip): + Use XftDrawSetClipRectangles(), since we're inside HAVE_XFT2 + anyway. (#113476) + Wed May 21 15:53:14 2003 Owen Taylor * gtk/gtkprogress.c (gtk_progress_set_format_string, diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index dda437ed6a..943681d27c 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2003-05-22 Matthias Clasen + + * gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_update_xft_clip): + Use XftDrawSetClipRectangles(), since we're inside HAVE_XFT2 + anyway. (#113476) + Wed May 21 15:53:14 2003 Owen Taylor * gtk/gtkprogress.c (gtk_progress_set_format_string, diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c index 8eaf6b352f..779965bed9 100644 --- a/gdk/x11/gdkdrawable-x11.c +++ b/gdk/x11/gdkdrawable-x11.c @@ -330,7 +330,6 @@ gdk_x11_drawable_update_xft_clip (GdkDrawable *drawable, { GdkRegionBox *boxes = gc_private->clip_region->rects; gint n_boxes = gc_private->clip_region->numRects; -#if 0 /* Until XftDrawSetClipRectangles is there */ XRectangle *rects = g_new (XRectangle, n_boxes); int i; @@ -344,25 +343,6 @@ gdk_x11_drawable_update_xft_clip (GdkDrawable *drawable, XftDrawSetClipRectangles (xft_draw, 0, 0, rects, n_boxes); g_free (rects); -#else - Region xregion = XCreateRegion (); - int i; - - for (i=0; i < n_boxes; i++) - { - XRectangle rect; - - rect.x = CLAMP (boxes[i].x1 + gc->clip_x_origin, G_MINSHORT, G_MAXSHORT); - rect.y = CLAMP (boxes[i].y1 + gc->clip_y_origin, G_MINSHORT, G_MAXSHORT); - rect.width = CLAMP (boxes[i].x2 + gc->clip_x_origin, G_MINSHORT, G_MAXSHORT) - rect.x; - rect.height = CLAMP (boxes[i].y2 + gc->clip_y_origin, G_MINSHORT, G_MAXSHORT) - rect.y; - - XUnionRectWithRegion (&rect, xregion, xregion); - } - - XftDrawSetClip (xft_draw, xregion); - XDestroyRegion (xregion); -#endif } else {