[gimp/gimp-2-8] Bug 663582 - Brush outline is too slow



commit cd6fa1d9c90daa8297ad8dc548328bb337e9dd3c
Author: Michael Natterer <mitch gimp org>
Date:   Sat Oct 6 16:39:14 2012 +0200

    Bug 663582 - Brush outline is too slow
    
    Even less drawing: let the timeout running if it triggers within the
    50ms since the last drawing, so it's reduced to its actual purpose of
    updating to the actual cursor position after framerate-limiter skipped
    drawing.
    (cherry picked from commit 52d933a1cc08ba388c63c58baa95f26c059df9b0)

 app/tools/gimpdrawtool.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/app/tools/gimpdrawtool.c b/app/tools/gimpdrawtool.c
index e014692..9cdce7e 100644
--- a/app/tools/gimpdrawtool.c
+++ b/app/tools/gimpdrawtool.c
@@ -180,6 +180,12 @@ gimp_draw_tool_control (GimpTool       *tool,
 static gboolean
 gimp_draw_tool_draw_timeout (GimpDrawTool *draw_tool)
 {
+  guint64 now = g_get_monotonic_time ();
+
+  /* keep the timeout running if the last drawing just happened */
+  if ((now - draw_tool->last_draw_time) <= MINIMUM_DRAW_INTERVAL)
+    return FALSE;
+
   draw_tool->draw_timeout = 0;
 
   gimp_draw_tool_draw (draw_tool);



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