buffer: rectify format==NULL earlier in gegl_buffer_get

parent 52e28c10
......@@ -1890,6 +1890,7 @@ _gegl_buffer_get_unlocked (GeglBuffer *buffer,
gegl_buffer_cl_cache_flush (buffer, rect);
}
if (scale == 1.0 &&
rect &&
rect->width == 1)
......@@ -1902,6 +1903,9 @@ _gegl_buffer_get_unlocked (GeglBuffer *buffer,
}
else
{
if (format == NULL)
format = buffer->soft_format;
gint bpp = babl_format_get_bytes_per_pixel (buffer->soft_format);
if (!format || buffer->soft_format == format || rowstride != bpp)
{
......@@ -1922,11 +1926,11 @@ _gegl_buffer_get_unlocked (GeglBuffer *buffer,
}
}
g_return_if_fail (scale > 0.0);
if (format == NULL)
format = buffer->soft_format;
g_return_if_fail (scale > 0.0);
if (!rect && GEGL_FLOAT_EQUAL (scale, 1.0))
{
gegl_buffer_iterate_read_dispatch (buffer, &buffer->extent, dest_buf,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment