[gimp] app: in GimpCurvesTool, calculate histogram asynchronously
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: in GimpCurvesTool, calculate histogram asynchronously
- Date: Fri, 11 May 2018 18:03:05 +0000 (UTC)
commit 49382e53d55d3be65135130a2898038aad1a3719
Author: Ell <ell_se yahoo com>
Date: Fri May 11 12:14:26 2018 -0400
app: in GimpCurvesTool, calculate histogram asynchronously
In GimpCurvesTool, calculate the histogram of the target drawable
asynchronously, rather than synchronously, to avoid blocking the UI
while the histogram is calculated.
app/tools/gimpcurvestool.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/app/tools/gimpcurvestool.c b/app/tools/gimpcurvestool.c
index 2ed792f..4263c0f 100644
--- a/app/tools/gimpcurvestool.c
+++ b/app/tools/gimpcurvestool.c
@@ -203,7 +203,8 @@ gimp_curves_tool_initialize (GimpTool *tool,
NULL);
histogram = gimp_histogram_new (config->linear);
- gimp_drawable_calculate_histogram (drawable, histogram, FALSE);
+ g_object_unref (gimp_drawable_calculate_histogram_async (
+ drawable, histogram, FALSE));
gimp_histogram_view_set_background (GIMP_HISTOGRAM_VIEW (c_tool->graph),
histogram);
g_object_unref (histogram);
@@ -628,8 +629,8 @@ gimp_curves_tool_config_notify (GimpFilterTool *filter_tool,
NULL);
histogram = gimp_histogram_new (curves_config->linear);
- gimp_drawable_calculate_histogram (GIMP_TOOL (filter_tool)->drawable,
- histogram, FALSE);
+ g_object_unref (gimp_drawable_calculate_histogram_async (
+ GIMP_TOOL (filter_tool)->drawable, histogram, FALSE));
gimp_histogram_view_set_background (GIMP_HISTOGRAM_VIEW (curves_tool->graph),
histogram);
g_object_unref (histogram);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]