[gimp/gimp-2-8] Bug 663582 - Brush outline is too slow
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] Bug 663582 - Brush outline is too slow
- Date: Fri, 5 Oct 2012 22:30:46 +0000 (UTC)
commit 55792c2f30fac01940d0a37990483f0f2d66bce5
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().
(cherry picked from commit 4218d9342f68de4fedec166df0a64585dc64081a)
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 13d997a..e014692 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]