[gimp] app: remove the manual double buffering from the canvas
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove the manual double buffering from the canvas
- Date: Sun, 28 Apr 2013 13:00:02 +0000 (UTC)
commit 77e70f3550464df79eedf8ac5b68e69933a3556f
Author: Michael Natterer <mitch gimp org>
Date: Sun Apr 28 14:51:57 2013 +0200
app: remove the manual double buffering from the canvas
It is messing with overlay widgets. Is was effectively disabled since
cairo tool drawing was introduced, but not completely.
app/display/gimpdisplayshell-callbacks.c | 50 ------------------------------
app/display/gimpdisplayshell-callbacks.h | 3 --
app/display/gimpdisplayshell.c | 9 -----
3 files changed, 0 insertions(+), 62 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-callbacks.c b/app/display/gimpdisplayshell-callbacks.c
index 7f14f11..16e2cdf 100644
--- a/app/display/gimpdisplayshell-callbacks.c
+++ b/app/display/gimpdisplayshell-callbacks.c
@@ -210,25 +210,6 @@ gimp_display_shell_canvas_size_allocate (GtkWidget *widget,
}
}
-static gboolean
-gimp_display_shell_is_double_buffered (GimpDisplayShell *shell)
-{
- return TRUE; /* FIXME: repair this after cairo tool drawing is done */
-
- /* always double-buffer if there are overlay children or a
- * transform preview, or they will flicker badly. Also double
- * buffer when we are editing paths.
- */
-#if 0
- if (GIMP_OVERLAY_BOX (shell->canvas)->children ||
- gimp_display_shell_get_show_transform (shell) ||
- GIMP_IS_VECTOR_TOOL (tool_manager_get_active (shell->display->gimp)))
- return TRUE;
-#endif
-
- return FALSE;
-}
-
gboolean
gimp_display_shell_canvas_expose (GtkWidget *widget,
GdkEventExpose *eevent,
@@ -243,15 +224,6 @@ gimp_display_shell_canvas_expose (GtkWidget *widget,
{
cairo_t *cr;
- if (gimp_display_get_image (shell->display))
- {
- if (gimp_display_shell_is_double_buffered (shell))
- gdk_window_begin_paint_region (eevent->window, eevent->region);
- }
-
- /* create the cairo_t after enabling double buffering, or we
- * will get the wrong window destination surface
- */
cr = gdk_cairo_create (gtk_widget_get_window (shell->canvas));
gdk_cairo_region (cr, eevent->region);
cairo_clip (cr);
@@ -272,28 +244,6 @@ gimp_display_shell_canvas_expose (GtkWidget *widget,
}
gboolean
-gimp_display_shell_canvas_expose_after (GtkWidget *widget,
- GdkEventExpose *eevent,
- GimpDisplayShell *shell)
-{
- /* are we in destruction? */
- if (! shell->display || ! gimp_display_get_shell (shell->display))
- return TRUE;
-
- /* ignore events on overlays */
- if (eevent->window == gtk_widget_get_window (widget))
- {
- if (gimp_display_get_image (shell->display))
- {
- if (gimp_display_shell_is_double_buffered (shell))
- gdk_window_end_paint (eevent->window);
- }
- }
-
- return FALSE;
-}
-
-gboolean
gimp_display_shell_origin_button_press (GtkWidget *widget,
GdkEventButton *event,
GimpDisplayShell *shell)
diff --git a/app/display/gimpdisplayshell-callbacks.h b/app/display/gimpdisplayshell-callbacks.h
index c81630c..2fca4e5 100644
--- a/app/display/gimpdisplayshell-callbacks.h
+++ b/app/display/gimpdisplayshell-callbacks.h
@@ -27,9 +27,6 @@ void gimp_display_shell_canvas_size_allocate (GtkWidget *widget,
gboolean gimp_display_shell_canvas_expose (GtkWidget *widget,
GdkEventExpose *eevent,
GimpDisplayShell *shell);
-gboolean gimp_display_shell_canvas_expose_after (GtkWidget *widget,
- GdkEventExpose *eevent,
- GimpDisplayShell *shell);
gboolean gimp_display_shell_origin_button_press (GtkWidget *widget,
GdkEventButton *bevent,
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index b1e9a79..c0e1915 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -574,9 +574,6 @@ gimp_display_shell_constructed (GObject *object)
g_signal_connect (shell->canvas, "expose-event",
G_CALLBACK (gimp_display_shell_canvas_expose),
shell);
- g_signal_connect_after (shell->canvas, "expose-event",
- G_CALLBACK (gimp_display_shell_canvas_expose_after),
- shell);
g_signal_connect (shell->canvas, "enter-notify-event",
G_CALLBACK (gimp_display_shell_canvas_tool_events),
@@ -1355,9 +1352,6 @@ gimp_display_shell_empty (GimpDisplayShell *shell)
gimp_statusbar_empty (GIMP_STATUSBAR (shell->statusbar));
- /* so wilber doesn't flicker */
- gtk_widget_set_double_buffered (shell->canvas, TRUE);
-
shell->rotate_angle = 0.0;
gimp_display_shell_rotate_update_transform (shell);
@@ -1416,9 +1410,6 @@ gimp_display_shell_fill (GimpDisplayShell *shell,
TRUE,
TRUE);
- /* we double buffer image drawing manually */
- gtk_widget_set_double_buffered (shell->canvas, FALSE);
-
shell->fill_idle_id =
g_idle_add_full (GIMP_DISPLAY_SHELL_FILL_IDLE_PRIORITY,
(GSourceFunc) gimp_display_shell_fill_idle, shell,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]