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().
This commit is contained in:
Michael Natterer 2012-10-06 00:27:49 +02:00
parent db5c952c4e
commit 4218d9342f
1 changed files with 15 additions and 8 deletions

View File

@ -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);
}
}
/**