[gimp/gimp-2-10] app: increase the maximal airbrush stamp FPS
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: increase the maximal airbrush stamp FPS
- Date: Thu, 13 Feb 2020 16:47:31 +0000 (UTC)
commit 075b072a64e751c7f4a50d0c44927d06e41facaa
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.
(cherry picked from commit 6cd3c8bc749f52bb6027a1af0828dc4b35b5e2ea)
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 1922eb0db9..37c7e785e1 100644
--- a/app/paint/gimpairbrushoptions.c
+++ b/app/paint/gimpairbrushoptions.c
@@ -29,7 +29,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
@@ -69,7 +69,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]