app: remove option for paint tools to opt out of a separate thread

After last commit, all paint tools work correctly with a separate
paint thread, so we can remove the option for specific paint tools
to opt out.  Particularly, GimpMybrushTool now uses a separate
paint thread too.

Note that the separate paint thread can still be disabled through
the GIMP_NO_PAINT_THREAD environment variable.
This commit is contained in:
Ell
2018-04-09 12:16:50 -04:00
parent 2ae16ca604
commit e98506b000
4 changed files with 3 additions and 9 deletions

View File

@ -84,10 +84,9 @@ gimp_mybrush_tool_class_init (GimpMybrushToolClass *klass)
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass); GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
GimpPaintToolClass *paint_tool_class = GIMP_PAINT_TOOL_CLASS (klass); GimpPaintToolClass *paint_tool_class = GIMP_PAINT_TOOL_CLASS (klass);
tool_class->options_notify = gimp_mybrush_tool_options_notify; tool_class->options_notify = gimp_mybrush_tool_options_notify;
paint_tool_class->get_outline = gimp_mybrush_tool_get_outline; paint_tool_class->get_outline = gimp_mybrush_tool_get_outline;
paint_tool_class->use_paint_thread = FALSE;
} }
static void static void

View File

@ -95,8 +95,7 @@ static volatile gboolean paint_timeout_pending;
static gboolean static gboolean
gimp_paint_tool_paint_use_thread (GimpPaintTool *paint_tool) gimp_paint_tool_paint_use_thread (GimpPaintTool *paint_tool)
{ {
if (GIMP_PAINT_TOOL_GET_CLASS (paint_tool)->use_paint_thread && if (! paint_tool->draw_line)
! paint_tool->draw_line)
{ {
if (! paint_thread) if (! paint_thread)
{ {

View File

@ -133,8 +133,6 @@ gimp_paint_tool_class_init (GimpPaintToolClass *klass)
tool_class->oper_update = gimp_paint_tool_oper_update; tool_class->oper_update = gimp_paint_tool_oper_update;
draw_tool_class->draw = gimp_paint_tool_draw; draw_tool_class->draw = gimp_paint_tool_draw;
klass->use_paint_thread = TRUE;
} }
static void static void

View File

@ -69,8 +69,6 @@ struct _GimpPaintToolClass
GimpDisplay *display, GimpDisplay *display,
gdouble x, gdouble x,
gdouble y); gdouble y);
gboolean use_paint_thread;
}; };