[gimp] 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] Issue #1283 - Artifacts in filters when aux input depends on filter result
- Date: Wed, 18 Sep 2019 10:17:53 +0000 (UTC)
commit 9f85efd825b694daa30e3557c61773d8c7b95d07
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.
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 eedd20625d..afb9fad060 100644
--- a/app/widgets/gimpbuffersourcebox.c
+++ b/app/widgets/gimpbuffersourcebox.c
@@ -30,6 +30,8 @@
#include "widgets-types.h"
+#include "gegl/gimp-gegl-utils.h"
+
#include "core/gimpcontext.h"
#include "core/gimppickable.h"
@@ -275,7 +277,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),
@@ -291,6 +299,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]