[gimp/gimp-2-10] Issue #1283 - Artifacts in filters when aux input depends on filter result
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] Issue #1283 - Artifacts in filters when aux input depends on filter result
- Date: Wed, 18 Sep 2019 10:17:48 +0000 (UTC)
commit a997027da4add9fa310efa025f75aaf75882f921
Author: Massimo Valentini <mvalentini335 gmail com>
Date: Tue Sep 17 18:12:08 2019 +0200
Issue #1283 - Artifacts in filters when aux input depends on filter result
In GimpBufferSourceBox, dup the selected buffer (and flush the
pickable to make sure it's fully rendered) instead of using it
directly in the source node. This avoids chunking artifacts when
the buffer's content depends on the filter output, such as when
using the affected layer, or a dependent projection, as input.
(cherry picked from commit 9f85efd825b694daa30e3557c61773d8c7b95d07)
app/widgets/gimpbuffersourcebox.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/app/widgets/gimpbuffersourcebox.c b/app/widgets/gimpbuffersourcebox.c
index f13b84462e..bb19ef250f 100644
--- a/app/widgets/gimpbuffersourcebox.c
+++ b/app/widgets/gimpbuffersourcebox.c
@@ -29,6 +29,8 @@
#include "widgets-types.h"
+#include "gegl/gimp-gegl-utils.h"
+
#include "core/gimpcontext.h"
#include "core/gimppickable.h"
@@ -278,7 +280,13 @@ gimp_buffer_source_box_update_node (GimpBufferSourceBox *box)
if (box->priv->enabled)
{
- buffer = gimp_pickable_get_buffer (box->priv->pickable);
+ gimp_pickable_flush (box->priv->pickable);
+
+ /* dup the buffer, since the original may be modified while applying
+ * the operation. see issue #1283.
+ */
+ buffer = gimp_gegl_buffer_dup (
+ gimp_pickable_get_buffer (box->priv->pickable));
}
desc = gimp_viewable_get_description (GIMP_VIEWABLE (box->priv->pickable),
@@ -294,6 +302,8 @@ gimp_buffer_source_box_update_node (GimpBufferSourceBox *box)
gegl_node_set (box->priv->source_node,
"buffer", buffer,
NULL);
+
+ g_clear_object (&buffer);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]