app: in gimp:offset, fix OFFSET_TRANSPARENT fast-path for chunked input
This commit is contained in:
@ -301,16 +301,24 @@ gimp_operation_offset_parent_process (GeglOperation *operation,
|
|||||||
|
|
||||||
if (input)
|
if (input)
|
||||||
{
|
{
|
||||||
const GeglRectangle *extent;
|
GeglRectangle bounds;
|
||||||
|
GeglRectangle extent;
|
||||||
|
|
||||||
extent = gegl_buffer_get_extent (GEGL_BUFFER (input));
|
bounds = gegl_operation_get_bounding_box (GEGL_OPERATION (offset));
|
||||||
|
|
||||||
|
extent = *gegl_buffer_get_extent (GEGL_BUFFER (input));
|
||||||
|
|
||||||
|
extent.x += x;
|
||||||
|
extent.y += y;
|
||||||
|
|
||||||
|
if (gegl_rectangle_intersect (&extent, &extent, &bounds))
|
||||||
|
{
|
||||||
output = g_object_new (GEGL_TYPE_BUFFER,
|
output = g_object_new (GEGL_TYPE_BUFFER,
|
||||||
"source", input,
|
"source", input,
|
||||||
"x", extent->x,
|
"x", extent.x,
|
||||||
"y", extent->y,
|
"y", extent.y,
|
||||||
"width", extent->width,
|
"width", extent.width,
|
||||||
"height", extent->height,
|
"height", extent.height,
|
||||||
"shift-x", -x,
|
"shift-x", -x,
|
||||||
"shift-y", -y,
|
"shift-y", -y,
|
||||||
NULL);
|
NULL);
|
||||||
@ -318,6 +326,7 @@ gimp_operation_offset_parent_process (GeglOperation *operation,
|
|||||||
if (gegl_object_get_has_forked (input))
|
if (gegl_object_get_has_forked (input))
|
||||||
gegl_object_set_has_forked (output);
|
gegl_object_set_has_forked (output);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gegl_operation_context_take_object (context, "output", output);
|
gegl_operation_context_take_object (context, "output", output);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user