[gimp/gtk3-port: 41/226] app: pass the cairo_region_t to gdk_window_invalidate_region() directly
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 41/226] app: pass the cairo_region_t to gdk_window_invalidate_region() directly
- Date: Sun, 29 Mar 2015 19:13:04 +0000 (UTC)
commit e51a5d74cbe9f6e00e9a5a45286cdc051117d80e
Author: Michael Natterer <mitch gimp org>
Date: Tue Oct 19 13:16:32 2010 +0200
app: pass the cairo_region_t to gdk_window_invalidate_region() directly
app/display/gimpdisplayshell-expose.c | 19 +------------------
1 files changed, 1 insertions(+), 18 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-expose.c b/app/display/gimpdisplayshell-expose.c
index 710e876..41398aa 100644
--- a/app/display/gimpdisplayshell-expose.c
+++ b/app/display/gimpdisplayshell-expose.c
@@ -42,31 +42,14 @@ void
gimp_display_shell_expose_region (GimpDisplayShell *shell,
cairo_region_t *region)
{
- GdkRegion *gdk_region;
- gint n_rectangles;
- gint i;
-
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
g_return_if_fail (region != NULL);
if (! gtk_widget_get_realized (shell->canvas))
return;
- gdk_region = gdk_region_new ();
- n_rectangles = cairo_region_num_rectangles (region);
-
- for (i = 0; i < n_rectangles; i++)
- {
- cairo_rectangle_int_t rectangle;
-
- cairo_region_get_rectangle (region, i, &rectangle);
-
- gdk_region_union_with_rect (gdk_region, (GdkRectangle *) &rectangle);
- }
-
gdk_window_invalidate_region (gtk_widget_get_window (shell->canvas),
- gdk_region, TRUE);
- gdk_region_destroy (gdk_region);
+ region, TRUE);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]