[gimp] libgimp: remove gimp_tile_ref() and gimp_tile_unref() from the API
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimp: remove gimp_tile_ref() and gimp_tile_unref() from the API
- Date: Fri, 19 Jul 2019 11:21:52 +0000 (UTC)
commit 3864e9c7821126ff6e56d26677d42e5b20e45476
Author: Michael Natterer <mitch gimp org>
Date: Fri Jul 19 13:20:50 2019 +0200
libgimp: remove gimp_tile_ref() and gimp_tile_unref() from the API
and make them private to libgimp ad _gimp_tile_ref(),unref()
libgimp/gimp.def | 2 --
libgimp/gimppixelrgn.c | 36 ++++++++++++++++++------------------
libgimp/gimptile.c | 8 ++++----
libgimp/gimptile.h | 8 +++-----
libgimp/gimptilebackendplugin.c | 4 ++--
5 files changed, 27 insertions(+), 31 deletions(-)
---
diff --git a/libgimp/gimp.def b/libgimp/gimp.def
index bc83801eab..7f1d2739c0 100644
--- a/libgimp/gimp.def
+++ b/libgimp/gimp.def
@@ -697,8 +697,6 @@ EXPORTS
gimp_text_layer_set_text
gimp_tile_cache_ntiles
gimp_tile_height
- gimp_tile_ref
- gimp_tile_unref
gimp_tile_width
gimp_uninstall_temp_proc
gimp_user_time
diff --git a/libgimp/gimppixelrgn.c b/libgimp/gimppixelrgn.c
index a00323f1f3..324053b5f1 100644
--- a/libgimp/gimppixelrgn.c
+++ b/libgimp/gimppixelrgn.c
@@ -187,7 +187,7 @@ gimp_pixel_rgn_get_pixel (GimpPixelRgn *pr,
g_return_if_fail (y >= 0 && y < pr->drawable->height);
tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y);
- gimp_tile_ref (tile);
+ _gimp_tile_ref (tile);
tile_data = (tile->data +
tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH)));
@@ -195,7 +195,7 @@ gimp_pixel_rgn_get_pixel (GimpPixelRgn *pr,
for (b = 0; b < tile->bpp; b++)
*buf++ = *tile_data++;
- gimp_tile_unref (tile, FALSE);
+ _gimp_tile_unref (tile, FALSE);
}
/**
@@ -235,7 +235,7 @@ gimp_pixel_rgn_get_row (GimpPixelRgn *pr,
gint boundary;
tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y);
- gimp_tile_ref (tile);
+ _gimp_tile_ref (tile);
tile_data = (tile->data +
tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH)));
@@ -250,7 +250,7 @@ gimp_pixel_rgn_get_row (GimpPixelRgn *pr,
x = min;
buf += inc;
- gimp_tile_unref (tile, FALSE);
+ _gimp_tile_unref (tile, FALSE);
}
}
@@ -293,7 +293,7 @@ gimp_pixel_rgn_get_col (GimpPixelRgn *pr,
gint b;
tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y);
- gimp_tile_ref (tile);
+ _gimp_tile_ref (tile);
tile_data = (tile->data +
tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH)));
@@ -309,7 +309,7 @@ gimp_pixel_rgn_get_col (GimpPixelRgn *pr,
tile_data += inc;
}
- gimp_tile_unref (tile, FALSE);
+ _gimp_tile_unref (tile, FALSE);
}
}
@@ -368,7 +368,7 @@ gimp_pixel_rgn_get_rect (GimpPixelRgn *pr,
GimpTile *tile;
tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y);
- gimp_tile_ref (tile);
+ _gimp_tile_ref (tile);
xstep = tile->ewidth - (x % TILE_WIDTH);
ystep = tile->eheight - (y % TILE_HEIGHT);
@@ -389,7 +389,7 @@ gimp_pixel_rgn_get_rect (GimpPixelRgn *pr,
memcpy (dest, src, (xboundary - x) * bpp);
}
- gimp_tile_unref (tile, FALSE);
+ _gimp_tile_unref (tile, FALSE);
x += xstep;
}
@@ -422,7 +422,7 @@ gimp_pixel_rgn_set_pixel (GimpPixelRgn *pr,
g_return_if_fail (y >= 0 && y < pr->drawable->height);
tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y);
- gimp_tile_ref (tile);
+ _gimp_tile_ref (tile);
tile_data = tile->data + tile->bpp * (tile->ewidth *
(y % TILE_HEIGHT) + (x % TILE_WIDTH));
@@ -430,7 +430,7 @@ gimp_pixel_rgn_set_pixel (GimpPixelRgn *pr,
for (b = 0; b < tile->bpp; b++)
*tile_data++ = *buf++;
- gimp_tile_unref (tile, TRUE);
+ _gimp_tile_unref (tile, TRUE);
}
/**
@@ -469,7 +469,7 @@ gimp_pixel_rgn_set_row (GimpPixelRgn *pr,
while (x < end)
{
tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y);
- gimp_tile_ref (tile);
+ _gimp_tile_ref (tile);
tile_data = (tile->data +
tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH)));
@@ -484,7 +484,7 @@ gimp_pixel_rgn_set_row (GimpPixelRgn *pr,
x = min;
buf += inc;
- gimp_tile_unref (tile, TRUE);
+ _gimp_tile_unref (tile, TRUE);
}
}
@@ -525,7 +525,7 @@ gimp_pixel_rgn_set_col (GimpPixelRgn *pr,
gint boundary;
tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y);
- gimp_tile_ref (tile);
+ _gimp_tile_ref (tile);
tile_data = (tile->data +
tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH)));
@@ -543,7 +543,7 @@ gimp_pixel_rgn_set_col (GimpPixelRgn *pr,
tile_data += inc;
}
- gimp_tile_unref (tile, TRUE);
+ _gimp_tile_unref (tile, TRUE);
}
}
@@ -602,7 +602,7 @@ gimp_pixel_rgn_set_rect (GimpPixelRgn *pr,
GimpTile *tile;
tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y);
- gimp_tile_ref (tile);
+ _gimp_tile_ref (tile);
xstep = tile->ewidth - (x % TILE_WIDTH);
ystep = tile->eheight - (y % TILE_HEIGHT);
@@ -623,7 +623,7 @@ gimp_pixel_rgn_set_rect (GimpPixelRgn *pr,
memcpy (dest, src, (xboundary - x) * bpp);
}
- gimp_tile_unref (tile, TRUE);
+ _gimp_tile_unref (tile, TRUE);
x += xstep;
}
@@ -770,7 +770,7 @@ gimp_pixel_rgns_process (gpointer pri_ptr)
prh->pr->shadow,
prh->pr->x,
prh->pr->y);
- gimp_tile_unref (tile, prh->pr->dirty);
+ _gimp_tile_unref (tile, prh->pr->dirty);
}
prh->pr->x += pri->portion_width;
@@ -927,7 +927,7 @@ gimp_pixel_rgn_configure (GimpPixelRgnHolder *prh,
prh->pr->shadow,
prh->pr->x,
prh->pr->y);
- gimp_tile_ref (tile);
+ _gimp_tile_ref (tile);
offx = prh->pr->x % TILE_WIDTH;
offy = prh->pr->y % TILE_HEIGHT;
diff --git a/libgimp/gimptile.c b/libgimp/gimptile.c
index c08cf4d06c..fdd8e0b213 100644
--- a/libgimp/gimptile.c
+++ b/libgimp/gimptile.c
@@ -71,7 +71,7 @@ static gulong max_cache_size = 0;
/* public functions */
void
-gimp_tile_ref (GimpTile *tile)
+_gimp_tile_ref (GimpTile *tile)
{
g_return_if_fail (tile != NULL);
@@ -109,8 +109,8 @@ _gimp_tile_ref_nocache (GimpTile *tile,
}
void
-gimp_tile_unref (GimpTile *tile,
- gboolean dirty)
+_gimp_tile_unref (GimpTile *tile,
+ gboolean dirty)
{
g_return_if_fail (tile != NULL);
g_return_if_fail (tile->ref_count > 0);
@@ -404,6 +404,6 @@ gimp_tile_cache_flush (GimpTile *tile)
/* Unreference the tile.
*/
- gimp_tile_unref (tile, FALSE);
+ _gimp_tile_unref (tile, FALSE);
}
}
diff --git a/libgimp/gimptile.h b/libgimp/gimptile.h
index e5e88541f7..5f5cbe547c 100644
--- a/libgimp/gimptile.h
+++ b/libgimp/gimptile.h
@@ -44,17 +44,15 @@ struct _GimpTile
};
-GIMP_DEPRECATED
-void gimp_tile_ref (GimpTile *tile);
-GIMP_DEPRECATED
-void gimp_tile_unref (GimpTile *tile,
- gboolean dirty);
GIMP_DEPRECATED
void gimp_tile_cache_ntiles (gulong ntiles);
/* private function */
+G_GNUC_INTERNAL void _gimp_tile_ref (GimpTile *tile);
+G_GNUC_INTERNAL void _gimp_tile_unref (GimpTile *tile,
+ gboolean dirty);
G_GNUC_INTERNAL void _gimp_tile_ref_nocache (GimpTile *tile,
gboolean init);
diff --git a/libgimp/gimptilebackendplugin.c b/libgimp/gimptilebackendplugin.c
index d1767fa000..abcb4c06ae 100644
--- a/libgimp/gimptilebackendplugin.c
+++ b/libgimp/gimptilebackendplugin.c
@@ -226,7 +226,7 @@ gimp_tile_read_mul (GimpTileBackendPlugin *backend_plugin,
}
}
- gimp_tile_unref (gimp_tile, FALSE);
+ _gimp_tile_unref (gimp_tile, FALSE);
}
}
@@ -276,7 +276,7 @@ gimp_tile_write_mul (GimpTileBackendPlugin *backend_plugin,
gimp_tile_stride);
}
- gimp_tile_unref (gimp_tile, TRUE);
+ _gimp_tile_unref (gimp_tile, TRUE);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]