[gtk+] gdk: Do DEBUG_UPDATES drawing with Cairo
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Do DEBUG_UPDATES drawing with Cairo
- Date: Mon, 26 Jul 2010 14:55:51 +0000 (UTC)
commit cfa3a71c7b6ae3ee250db45e35bd1915bcee512c
Author: Benjamin Otte <otte redhat com>
Date: Sat Jul 17 04:28:40 2010 +0200
gdk: Do DEBUG_UPDATES drawing with Cairo
gdk/gdkwindow.c | 23 +++++++----------------
1 files changed, 7 insertions(+), 16 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index c899cbc..3235c6b 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -5783,24 +5783,15 @@ static void
draw_ugly_color (GdkWindow *window,
const cairo_region_t *region)
{
- /* Draw ugly color all over the newly-invalid region */
- GdkColor ugly_color = { 0, 50000, 10000, 10000 };
- GdkGC *ugly_gc;
- GdkRectangle clipbox;
-
- ugly_gc = gdk_gc_new (window);
- gdk_gc_set_rgb_fg_color (ugly_gc, &ugly_color);
- gdk_gc_set_clip_region (ugly_gc, region);
-
- cairo_region_get_extents (region, &clipbox);
+ cairo_t *cr;
- gdk_draw_rectangle (window,
- ugly_gc,
- TRUE,
- clipbox.x, clipbox.y,
- clipbox.width, clipbox.height);
+ cr = gdk_cairo_create (window);
+ /* Draw ugly color all over the newly-invalid region */
+ cairo_set_source_rgb (cr, 50000/65535., 10000/65535., 10000/65535.);
+ gdk_cairo_region (cr, region);
+ cairo_fill (cr);
- g_object_unref (ugly_gc);
+ cairo_destroy (cr);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]