[gegl] buffer: use inlinable ceilf in buffer accesors
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: use inlinable ceilf in buffer accesors
- Date: Wed, 13 May 2020 01:13:42 +0000 (UTC)
commit ac2b5e0750107ef442746867867ce6b62f7de8e5
Author: Øyvind Kolås <pippin gimp org>
Date: Wed May 13 03:06:13 2020 +0200
buffer: use inlinable ceilf in buffer accesors
Removing two non-inlined function calls from the gegl_buffer_get.
gegl/buffer/gegl-buffer-access.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-access.c b/gegl/buffer/gegl-buffer-access.c
index ad4b54c40..8ad9747af 100644
--- a/gegl/buffer/gegl-buffer-access.c
+++ b/gegl/buffer/gegl-buffer-access.c
@@ -2003,7 +2003,7 @@ _gegl_get_required_for_scale (const GeglRectangle *roi,
gint y1 = int_floorf (roi->y / scale + GEGL_SCALE_EPSILON);
gint y2 = int_ceilf ((roi->y + roi->height) / scale - GEGL_SCALE_EPSILON);
- gint pad = (1.0 / scale > 1.0) ? ceilf (1.0 / scale) : 1;
+ gint pad = (1.0 / scale > 1.0) ? int_ceilf (1.0 / scale) : 1;
if (scale < 1.0)
{
@@ -2119,11 +2119,11 @@ _gegl_buffer_get_unlocked (GeglBuffer *buffer,
rect0.x = int_floorf (rect->x / scale_orig + GEGL_SCALE_EPSILON);
rect0.y = int_floorf (rect->y / scale_orig + GEGL_SCALE_EPSILON);
- rect0.width = ceilf ((rect->x + rect->width) / scale_orig -
- GEGL_SCALE_EPSILON) -
+ rect0.width = int_ceilf ((rect->x + rect->width) / scale_orig -
+ GEGL_SCALE_EPSILON) -
rect0.x;
- rect0.height = ceilf ((rect->y + rect->height) / scale_orig -
- GEGL_SCALE_EPSILON) -
+ rect0.height = int_ceilf ((rect->y + rect->height) / scale_orig -
+ GEGL_SCALE_EPSILON) -
rect0.y;
gegl_buffer_iterate_read_dispatch (buffer, &rect0,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]