[gimp] Bug 730862 - Preview frozen while dragging selection tools...



commit 2068c61a852892a8e0e4fe9765d54c17a037a7dc
Author: Michael Natterer <mitch gimp org>
Date:   Mon Jun 2 20:55:33 2014 +0200

    Bug 730862 - Preview frozen while dragging selection tools...
    
    ...(crop, rectangle, etc) in large image zoomed-to-fit
    
    Default to GIMP_MOTION_MODE_COMPRESS in all tools, and override it to
    GIMP_MOTION_MODE_EXACT if the tool really needs the exact path of
    motion events. This greatly reduces the events processed by the
    rectangle tools and makes them much more responsive.

 app/tools/gimpcolorpickertool.c      |    3 ---
 app/tools/gimpeditselectiontool.c    |    4 ----
 app/tools/gimpforegroundselecttool.c |    1 +
 app/tools/gimpfreeselecttool.c       |    1 +
 app/tools/gimpmovetool.c             |    2 --
 app/tools/gimpregionselecttool.c     |    1 -
 app/tools/gimpseamlessclonetool.c    |    3 ---
 app/tools/gimptoolcontrol.c          |    2 +-
 app/tools/gimpvectortool.c           |    2 --
 9 files changed, 3 insertions(+), 16 deletions(-)
---
diff --git a/app/tools/gimpcolorpickertool.c b/app/tools/gimpcolorpickertool.c
index d343b01..1ffb595 100644
--- a/app/tools/gimpcolorpickertool.c
+++ b/app/tools/gimpcolorpickertool.c
@@ -119,11 +119,8 @@ gimp_color_picker_tool_class_init (GimpColorPickerToolClass *klass)
 static void
 gimp_color_picker_tool_init (GimpColorPickerTool *picker_tool)
 {
-  GimpTool      *tool       = GIMP_TOOL (picker_tool);
   GimpColorTool *color_tool = GIMP_COLOR_TOOL (picker_tool);
 
-  gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_COMPRESS);
-
   color_tool->pick_mode = GIMP_COLOR_PICK_MODE_FOREGROUND;
 }
 
diff --git a/app/tools/gimpeditselectiontool.c b/app/tools/gimpeditselectiontool.c
index 0b93f7c..b9bb2f2 100644
--- a/app/tools/gimpeditselectiontool.c
+++ b/app/tools/gimpeditselectiontool.c
@@ -146,10 +146,6 @@ gimp_edit_selection_tool_class_init (GimpEditSelectionToolClass *klass)
 static void
 gimp_edit_selection_tool_init (GimpEditSelectionTool *edit_selection_tool)
 {
-  GimpTool *tool = GIMP_TOOL (edit_selection_tool);
-
-  gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_COMPRESS);
-
   edit_selection_tool->origx      = 0;
   edit_selection_tool->origy      = 0;
 
diff --git a/app/tools/gimpforegroundselecttool.c b/app/tools/gimpforegroundselecttool.c
index 9ed02f6..8250411 100644
--- a/app/tools/gimpforegroundselecttool.c
+++ b/app/tools/gimpforegroundselecttool.c
@@ -226,6 +226,7 @@ gimp_foreground_select_tool_init (GimpForegroundSelectTool *fg_select)
 {
   GimpTool *tool = GIMP_TOOL (fg_select);
 
+  gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_EXACT);
   gimp_tool_control_set_scroll_lock (tool->control, FALSE);
   gimp_tool_control_set_preserve    (tool->control, FALSE);
   gimp_tool_control_set_dirty_mask  (tool->control,
diff --git a/app/tools/gimpfreeselecttool.c b/app/tools/gimpfreeselecttool.c
index 39269c9..678e666 100644
--- a/app/tools/gimpfreeselecttool.c
+++ b/app/tools/gimpfreeselecttool.c
@@ -233,6 +233,7 @@ gimp_free_select_tool_init (GimpFreeSelectTool *fst)
   GimpTool                  *tool = GIMP_TOOL (fst);
   GimpFreeSelectToolPrivate *priv = GET_PRIVATE (fst);
 
+  gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_EXACT);
   gimp_tool_control_set_wants_click (tool->control, TRUE);
   gimp_tool_control_set_precision   (tool->control,
                                      GIMP_CURSOR_PRECISION_SUBPIXEL);
diff --git a/app/tools/gimpmovetool.c b/app/tools/gimpmovetool.c
index f9320d0..ccb9ee7 100644
--- a/app/tools/gimpmovetool.c
+++ b/app/tools/gimpmovetool.c
@@ -154,8 +154,6 @@ gimp_move_tool_init (GimpMoveTool *move_tool)
 {
   GimpTool *tool = GIMP_TOOL (move_tool);
 
-  gimp_tool_control_set_motion_mode        (tool->control,
-                                            GIMP_MOTION_MODE_COMPRESS);
   gimp_tool_control_set_snap_to            (tool->control, FALSE);
   gimp_tool_control_set_handle_empty_image (tool->control, TRUE);
   gimp_tool_control_set_tool_cursor        (tool->control,
diff --git a/app/tools/gimpregionselecttool.c b/app/tools/gimpregionselecttool.c
index bd4caf8..07b3a95 100644
--- a/app/tools/gimpregionselecttool.c
+++ b/app/tools/gimpregionselecttool.c
@@ -103,7 +103,6 @@ gimp_region_select_tool_init (GimpRegionSelectTool *region_select)
   GimpTool *tool = GIMP_TOOL (region_select);
 
   gimp_tool_control_set_scroll_lock (tool->control, TRUE);
-  gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_COMPRESS);
 
   region_select->x               = 0;
   region_select->y               = 0;
diff --git a/app/tools/gimpseamlessclonetool.c b/app/tools/gimpseamlessclonetool.c
index 8217c2a..ce95119 100644
--- a/app/tools/gimpseamlessclonetool.c
+++ b/app/tools/gimpseamlessclonetool.c
@@ -221,9 +221,6 @@ gimp_seamless_clone_tool_init (GimpSeamlessCloneTool *self)
   gimp_tool_control_set_tool_cursor (tool->control,
                                      GIMP_TOOL_CURSOR_MOVE);
 
-  gimp_tool_control_set_motion_mode (tool->control,
-                                     GIMP_MOTION_MODE_COMPRESS);
-
   self->tool_state = SC_STATE_INIT;
 }
 
diff --git a/app/tools/gimptoolcontrol.c b/app/tools/gimptoolcontrol.c
index 9ffa354..e4731bc 100644
--- a/app/tools/gimptoolcontrol.c
+++ b/app/tools/gimptoolcontrol.c
@@ -51,7 +51,7 @@ gimp_tool_control_init (GimpToolControl *control)
   control->handle_empty_image     = FALSE;
 
   control->dirty_mask             = GIMP_DIRTY_NONE;
-  control->motion_mode            = GIMP_MOTION_MODE_EXACT;
+  control->motion_mode            = GIMP_MOTION_MODE_COMPRESS;
 
   control->auto_snap_to           = TRUE;
   control->snap_offset_x          = 0;
diff --git a/app/tools/gimpvectortool.c b/app/tools/gimpvectortool.c
index a618a8a..476ae7b 100644
--- a/app/tools/gimpvectortool.c
+++ b/app/tools/gimpvectortool.c
@@ -189,8 +189,6 @@ gimp_vector_tool_init (GimpVectorTool *vector_tool)
   GimpTool *tool = GIMP_TOOL (vector_tool);
 
   gimp_tool_control_set_handle_empty_image (tool->control, TRUE);
-  gimp_tool_control_set_motion_mode        (tool->control,
-                                            GIMP_MOTION_MODE_COMPRESS);
   gimp_tool_control_set_precision          (tool->control,
                                             GIMP_CURSOR_PRECISION_SUBPIXEL);
   gimp_tool_control_set_tool_cursor        (tool->control,


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