diff options
author | Owen Taylor <otaylor@redhat.com> | 2003-06-04 23:26:52 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2003-06-04 23:26:52 +0000 |
commit | 76fc08a3fc962c5fa29672825718fdd073039d22 (patch) | |
tree | 29e49aad74d0a1a296d91e403b62151c5bcc4b77 /gtk/gtktextdisplay.c | |
parent | c1ccc9b9a449614b66fa89e43f996801d316432e (diff) | |
download | gtk+-76fc08a3fc962c5fa29672825718fdd073039d22.tar.gz |
Keep track of when we have a clip mask set for the GC, and when we unset
Wed Jun 4 19:24:28 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkgc-x11.c gdk/x11/gdkprivate-x11.h: Keep
track of when we have a clip mask set for the GC,
and when we unset it, or switch to a clip region,
immediately call XSetClipMask (..., None) to avoid
Xlib caching stale data. (#111806)
* gtk/gtktextdisplay.c: Don't set a clip mask
when drawing alpha pixmaps; it isn't necessary any more.
(#111806)
Diffstat (limited to 'gtk/gtktextdisplay.c')
-rw-r--r-- | gtk/gtktextdisplay.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/gtk/gtktextdisplay.c b/gtk/gtktextdisplay.c index f96a40f551..55e64099fb 100644 --- a/gtk/gtktextdisplay.c +++ b/gtk/gtktextdisplay.c @@ -371,30 +371,6 @@ render_layout_line (GdkDrawable *drawable, if (gdk_rectangle_intersect (&pixbuf_rect, &render_state->clip_rect, &draw_rect)) { - GdkBitmap *mask = NULL; - - if (gdk_pixbuf_get_has_alpha (pixbuf)) - { - mask = gdk_pixmap_new (drawable, - gdk_pixbuf_get_width (pixbuf), - gdk_pixbuf_get_height (pixbuf), - 1); - - gdk_pixbuf_render_threshold_alpha (pixbuf, mask, - 0, 0, 0, 0, - gdk_pixbuf_get_width (pixbuf), - gdk_pixbuf_get_height (pixbuf), - 128); - - } - - if (mask) - { - gdk_gc_set_clip_mask (render_state->fg_gc, mask); - gdk_gc_set_clip_origin (render_state->fg_gc, - pixbuf_rect.x, pixbuf_rect.y); - } - gdk_draw_pixbuf (drawable, render_state->fg_gc, pixbuf, @@ -405,13 +381,6 @@ render_layout_line (GdkDrawable *drawable, draw_rect.height, GDK_RGB_DITHER_NORMAL, 0, 0); - - if (mask) - { - gdk_gc_set_clip_rectangle (render_state->fg_gc, - &render_state->clip_rect); - g_object_unref (mask); - } } shaped_width_pixels = width; |