[gimp] Bug 663582 - Brush outline is too slow



commit 4218d9342f68de4fedec166df0a64585dc64081a
Author: Michael Natterer <mitch gimp org>
Date:   Sat Oct 6 00:27:49 2012 +0200

    Bug 663582 - Brush outline is too slow
    
    One more try: merge the spirit of Alexia's patch, but don't disable
    the timeout, only make sure the minimum fps is also applied when
    drawing is triggered by gimp_draw_tool_resume().

 app/tools/gimpdrawtool.c |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/app/tools/gimpdrawtool.c b/app/tools/gimpdrawtool.c
index c20886e..ae3ccae 100644
--- a/app/tools/gimpdrawtool.c
+++ b/app/tools/gimpdrawtool.c
@@ -322,16 +322,23 @@ gimp_draw_tool_resume (GimpDrawTool *draw_tool)
 
   draw_tool->paused_count--;
 
+  if (draw_tool->paused_count == 0)
+    {
 #ifdef USE_TIMEOUT
-  if (draw_tool->paused_count == 0 && ! draw_tool->draw_timeout)
-    draw_tool->draw_timeout =
-      gdk_threads_add_timeout_full (G_PRIORITY_HIGH_IDLE,
-                                    DRAW_TIMEOUT,
-                                    (GSourceFunc) gimp_draw_tool_draw_timeout,
-                                    draw_tool, NULL);
-#else
-  gimp_draw_tool_draw (draw_tool);
+      if (! draw_tool->draw_timeout)
+        draw_tool->draw_timeout =
+          gdk_threads_add_timeout_full (G_PRIORITY_HIGH_IDLE,
+                                        DRAW_TIMEOUT,
+                                        (GSourceFunc) gimp_draw_tool_draw_timeout,
+                                        draw_tool, NULL);
 #endif
+
+      /* call draw() anyway, it will do nothing if the timeout is
+       * running, but will additionally check the drawing times to
+       * ensure the minimum framerate
+       */
+      gimp_draw_tool_draw (draw_tool);
+    }
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]