[gimp] app: increase the maximal airbrush stamp FPS



commit 6cd3c8bc749f52bb6027a1af0828dc4b35b5e2ea
Author: Ell <ell_se yahoo com>
Date:   Thu Feb 13 18:44:58 2020 +0200

    app: increase the maximal airbrush stamp FPS
    
    In the Airbrush tool, increase the maximal stamp FPS from 15 to 60,
    and change the corresponding maximal Rate value from 150 to 100.
    This technically affects tool presets, but we'll live.

 app/paint/gimpairbrush.c        | 13 +++++++++----
 app/paint/gimpairbrushoptions.c |  4 ++--
 2 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/app/paint/gimpairbrush.c b/app/paint/gimpairbrush.c
index 229ed9d482..b4bf5b4f20 100644
--- a/app/paint/gimpairbrush.c
+++ b/app/paint/gimpairbrush.c
@@ -36,6 +36,9 @@
 #include "gimp-intl.h"
 
 
+#define STAMP_MAX_FPS 60
+
+
 enum
 {
   STAMP,
@@ -178,11 +181,13 @@ gimp_airbrush_paint (GimpPaintCore    *paint_core,
                                                          paint_options,
                                                          fade_point);
 
-          timeout = 10000 / (options->rate * dynamic_rate);
+          timeout = (1000.0 / STAMP_MAX_FPS) /
+                    ((options->rate / 100.0) * dynamic_rate);
 
-          airbrush->timeout_id = g_timeout_add (timeout,
-                                                gimp_airbrush_timeout,
-                                                airbrush);
+          airbrush->timeout_id = g_timeout_add_full (G_PRIORITY_HIGH,
+                                                     timeout,
+                                                     gimp_airbrush_timeout,
+                                                     airbrush, NULL);
         }
       break;
 
diff --git a/app/paint/gimpairbrushoptions.c b/app/paint/gimpairbrushoptions.c
index 59bb0c8327..2a1b8e8d92 100644
--- a/app/paint/gimpairbrushoptions.c
+++ b/app/paint/gimpairbrushoptions.c
@@ -30,7 +30,7 @@
 #include "gimp-intl.h"
 
 
-#define AIRBRUSH_DEFAULT_RATE        80.0
+#define AIRBRUSH_DEFAULT_RATE        50.0
 #define AIRBRUSH_DEFAULT_FLOW        10.0
 #define AIRBRUSH_DEFAULT_MOTION_ONLY FALSE
 
@@ -70,7 +70,7 @@ gimp_airbrush_options_class_init (GimpAirbrushOptionsClass *klass)
                            "rate",
                            C_("airbrush-tool", "Rate"),
                            NULL,
-                           0.0, 150.0, AIRBRUSH_DEFAULT_RATE,
+                           0.0, 100.0, AIRBRUSH_DEFAULT_RATE,
                            GIMP_PARAM_STATIC_STRINGS);
 
 


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