app: in gimp_gegl_apply_cached_operation(), don't dup src buffer for point ops
In gimp_gegl_apply_cached_operation(), when the source and
destination buffers are the same, avoid duplicating the source
buffer when the applied operation is a point operation, since
applying it in chunks from/to the same buffer is not a problem in
this case.
(cherry picked from commit 0d21f2469b
)
This commit is contained in:
@ -120,12 +120,18 @@ gimp_gegl_apply_cached_operation (GeglBuffer *src_buffer,
|
|||||||
GeglNode *src_node;
|
GeglNode *src_node;
|
||||||
|
|
||||||
/* dup() because reading and writing the same buffer doesn't
|
/* dup() because reading and writing the same buffer doesn't
|
||||||
* work with area ops when working in chunks. See bug #701875.
|
* generally work with non-point ops when working in chunks.
|
||||||
|
* See bug #701875.
|
||||||
*/
|
*/
|
||||||
if (src_buffer == dest_buffer)
|
if (src_buffer == dest_buffer &&
|
||||||
src_buffer = gegl_buffer_dup (src_buffer);
|
! gimp_gegl_node_is_point_operation (operation))
|
||||||
|
{
|
||||||
|
src_buffer = gegl_buffer_dup (src_buffer);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
g_object_ref (src_buffer);
|
{
|
||||||
|
g_object_ref (src_buffer);
|
||||||
|
}
|
||||||
|
|
||||||
src_node = gegl_node_new_child (gegl,
|
src_node = gegl_node_new_child (gegl,
|
||||||
"operation", "gegl:buffer-source",
|
"operation", "gegl:buffer-source",
|
||||||
|
Reference in New Issue
Block a user