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



commit e98506b0007af9e6d81bba2c89f1d8b0b7cb6e52
Author: Ell <ell_se yahoo com>
Date:   Mon Apr 9 12:16:50 2018 -0400

    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.

 app/tools/gimpmybrushtool.c     |    5 ++---
 app/tools/gimppainttool-paint.c |    3 +--
 app/tools/gimppainttool.c       |    2 --
 app/tools/gimppainttool.h       |    2 --
 4 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/app/tools/gimpmybrushtool.c b/app/tools/gimpmybrushtool.c
index a6944e0..5203681 100644
--- a/app/tools/gimpmybrushtool.c
+++ b/app/tools/gimpmybrushtool.c
@@ -84,10 +84,9 @@ gimp_mybrush_tool_class_init (GimpMybrushToolClass *klass)
   GimpToolClass      *tool_class       = GIMP_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->use_paint_thread = FALSE;
+  paint_tool_class->get_outline = gimp_mybrush_tool_get_outline;
 }
 
 static void
diff --git a/app/tools/gimppainttool-paint.c b/app/tools/gimppainttool-paint.c
index edce86a..d357ce4 100644
--- a/app/tools/gimppainttool-paint.c
+++ b/app/tools/gimppainttool-paint.c
@@ -95,8 +95,7 @@ static volatile gboolean  paint_timeout_pending;
 static gboolean
 gimp_paint_tool_paint_use_thread (GimpPaintTool *paint_tool)
 {
-  if (GIMP_PAINT_TOOL_GET_CLASS (paint_tool)->use_paint_thread &&
-      ! paint_tool->draw_line)
+  if (! paint_tool->draw_line)
     {
       if (! paint_thread)
         {
diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c
index 92bd9bc..77ef265 100644
--- a/app/tools/gimppainttool.c
+++ b/app/tools/gimppainttool.c
@@ -133,8 +133,6 @@ gimp_paint_tool_class_init (GimpPaintToolClass *klass)
   tool_class->oper_update    = gimp_paint_tool_oper_update;
 
   draw_tool_class->draw      = gimp_paint_tool_draw;
-
-  klass->use_paint_thread    = TRUE;
 }
 
 static void
diff --git a/app/tools/gimppainttool.h b/app/tools/gimppainttool.h
index 3dbb4aa..d2eff14 100644
--- a/app/tools/gimppainttool.h
+++ b/app/tools/gimppainttool.h
@@ -69,8 +69,6 @@ struct _GimpPaintToolClass
                                     GimpDisplay   *display,
                                     gdouble        x,
                                     gdouble        y);
-
-  gboolean use_paint_thread;
 };
 
 


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