gdk: Do DEBUG_UPDATES drawing with Cairo
This commit is contained in:
@ -5783,24 +5783,15 @@ static void
|
|||||||
draw_ugly_color (GdkWindow *window,
|
draw_ugly_color (GdkWindow *window,
|
||||||
const cairo_region_t *region)
|
const cairo_region_t *region)
|
||||||
{
|
{
|
||||||
|
cairo_t *cr;
|
||||||
|
|
||||||
|
cr = gdk_cairo_create (window);
|
||||||
/* Draw ugly color all over the newly-invalid region */
|
/* Draw ugly color all over the newly-invalid region */
|
||||||
GdkColor ugly_color = { 0, 50000, 10000, 10000 };
|
cairo_set_source_rgb (cr, 50000/65535., 10000/65535., 10000/65535.);
|
||||||
GdkGC *ugly_gc;
|
gdk_cairo_region (cr, region);
|
||||||
GdkRectangle clipbox;
|
cairo_fill (cr);
|
||||||
|
|
||||||
ugly_gc = gdk_gc_new (window);
|
cairo_destroy (cr);
|
||||||
gdk_gc_set_rgb_fg_color (ugly_gc, &ugly_color);
|
|
||||||
gdk_gc_set_clip_region (ugly_gc, region);
|
|
||||||
|
|
||||||
cairo_region_get_extents (region, &clipbox);
|
|
||||||
|
|
||||||
gdk_draw_rectangle (window,
|
|
||||||
ugly_gc,
|
|
||||||
TRUE,
|
|
||||||
clipbox.x, clipbox.y,
|
|
||||||
clipbox.width, clipbox.height);
|
|
||||||
|
|
||||||
g_object_unref (ugly_gc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user