[gimp] app: Prefix TileManager functions
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: Prefix TileManager functions
- Date: Wed, 7 Sep 2011 10:19:38 +0000 (UTC)
commit 9f1187f6a5318a757355b69e8fdd384119313a55
Author: Martin Nordholts <martinn src gnome org>
Date: Wed Sep 7 11:47:41 2011 +0200
app: Prefix TileManager functions
read_pixel_data() -> tile_manager_read_pixel_data()
write_pixel_data() -> tile_manager_write_pixel_data()
read_pixel_data_1() -> tile_manager_read_pixel_data_1()
write_pixel_data_1() -> tile_manager_write_pixel_data_1()
for consistency.
app/base/pixel-region.c | 8 +++--
app/base/siox.c | 4 +-
app/base/tile-manager.c | 38 ++++++++++++------------
app/base/tile-manager.h | 48 +++++++++++++++---------------
app/core/gimp-transform-region.c | 16 +++++----
app/core/gimpdrawable.c | 3 +-
app/core/gimpimagemap.c | 8 ++--
app/core/gimpprojection.c | 2 +-
app/display/gimpcanvastransformpreview.c | 42 +++++++++++++++-----------
app/gimpcore.def | 2 +-
app/paint-funcs/scale-region.c | 3 +-
devel-docs/app/app-sections.txt | 8 ++--
12 files changed, 97 insertions(+), 85 deletions(-)
---
diff --git a/app/base/pixel-region.c b/app/base/pixel-region.c
index e8a5fe9..8a6ea30 100644
--- a/app/base/pixel-region.c
+++ b/app/base/pixel-region.c
@@ -167,7 +167,8 @@ pixel_region_get_row (PixelRegion *PR,
if (subsample == 1)
{
if (PR->tiles)
- read_pixel_data (PR->tiles, x, y, end - 1, y, data, PR->bytes);
+ tile_manager_read_pixel_data (PR->tiles, x, y, end - 1, y, data,
+ PR->bytes);
else
memcpy (data, PR->data + x * bpp + y * PR->rowstride, w * bpp);
}
@@ -206,7 +207,8 @@ pixel_region_set_row (PixelRegion *PR,
{
gint end = x + w;
- write_pixel_data (PR->tiles, x, y, end - 1, y, data, PR->bytes);
+ tile_manager_write_pixel_data (PR->tiles, x, y, end - 1, y, data,
+ PR->bytes);
}
else
{
@@ -268,7 +270,7 @@ pixel_region_set_col (PixelRegion *PR,
gint end = y + h;
gint bpp = PR->bytes;
- write_pixel_data (PR->tiles, x, y, x, end-1, data, bpp);
+ tile_manager_write_pixel_data (PR->tiles, x, y, x, end-1, data, bpp);
}
gboolean
diff --git a/app/base/siox.c b/app/base/siox.c
index 597a77c..6a3ec23 100644
--- a/app/base/siox.c
+++ b/app/base/siox.c
@@ -555,7 +555,7 @@ depth_first_search (TileManager *mask,
oldx = xx;
- read_pixel_data_1 (mask, xx, yy, &val);
+ tile_manager_read_pixel_data_1 (mask, xx, yy, &val);
if (val && (val != mark))
{
@@ -566,7 +566,7 @@ depth_first_search (TileManager *mask,
b->mustkeep = TRUE;
}
- write_pixel_data_1 (mask, xx, yy, &mark);
+ tile_manager_write_pixel_data_1 (mask, xx, yy, &mark);
if (yy > y)
stack = g_slist_prepend (g_slist_prepend
diff --git a/app/base/tile-manager.c b/app/base/tile-manager.c
index 4111df2..5772661 100644
--- a/app/base/tile-manager.c
+++ b/app/base/tile-manager.c
@@ -699,13 +699,13 @@ tile_manager_map_over_tile (TileManager *tm,
}
void
-read_pixel_data (TileManager *tm,
- gint x1,
- gint y1,
- gint x2,
- gint y2,
- guchar *buffer,
- guint stride)
+tile_manager_read_pixel_data (TileManager *tm,
+ gint x1,
+ gint y1,
+ gint x2,
+ gint y2,
+ guchar *buffer,
+ guint stride)
{
guint x, y;
@@ -741,13 +741,13 @@ read_pixel_data (TileManager *tm,
}
void
-write_pixel_data (TileManager *tm,
- gint x1,
- gint y1,
- gint x2,
- gint y2,
- const guchar *buffer,
- guint stride)
+tile_manager_write_pixel_data (TileManager *tm,
+ gint x1,
+ gint y1,
+ gint x2,
+ gint y2,
+ const guchar *buffer,
+ guint stride)
{
guint x, y;
@@ -783,10 +783,10 @@ write_pixel_data (TileManager *tm,
}
void
-read_pixel_data_1 (TileManager *tm,
- gint x,
- gint y,
- guchar *buffer)
+tile_manager_read_pixel_data_1 (TileManager *tm,
+ gint x,
+ gint y,
+ guchar *buffer)
{
const gint num = tile_manager_get_tile_num (tm, x, y);
@@ -834,7 +834,7 @@ read_pixel_data_1 (TileManager *tm,
}
void
-write_pixel_data_1 (TileManager *tm,
+tile_manager_write_pixel_data_1 (TileManager *tm,
gint x,
gint y,
const guchar *buffer)
diff --git a/app/base/tile-manager.h b/app/base/tile-manager.h
index e9683ed..3697d18 100644
--- a/app/base/tile-manager.h
+++ b/app/base/tile-manager.h
@@ -112,33 +112,33 @@ void tile_manager_map_over_tile (TileManager *tm,
Tile *tile,
Tile *srctile);
-void read_pixel_data (TileManager *tm,
- gint x1,
- gint y1,
- gint x2,
- gint y2,
- guchar *buffer,
- guint stride);
-
-void write_pixel_data (TileManager *tm,
- gint x1,
- gint y1,
- gint x2,
- gint y2,
- const guchar *buffer,
- guint stride);
+void tile_manager_read_pixel_data (TileManager *tm,
+ gint x1,
+ gint y1,
+ gint x2,
+ gint y2,
+ guchar *buffer,
+ guint stride);
+
+void tile_manager_write_pixel_data (TileManager *tm,
+ gint x1,
+ gint y1,
+ gint x2,
+ gint y2,
+ const guchar *buffer,
+ guint stride);
/* Fill buffer with the pixeldata for the pixel at coordinates x,y
* if x,y is outside the area of the tilemanger, nothing is done.
*/
-void read_pixel_data_1 (TileManager *tm,
- gint x,
- gint y,
- guchar *buffer);
-
-void write_pixel_data_1 (TileManager *tm,
- gint x,
- gint y,
- const guchar *buffer);
+void tile_manager_read_pixel_data_1 (TileManager *tm,
+ gint x,
+ gint y,
+ guchar *buffer);
+
+void tile_manager_write_pixel_data_1 (TileManager *tm,
+ gint x,
+ gint y,
+ const guchar *buffer);
#endif /* __TILE_MANAGER_H__ */
diff --git a/app/core/gimp-transform-region.c b/app/core/gimp-transform-region.c
index ff1430b..1143449 100644
--- a/app/core/gimp-transform-region.c
+++ b/app/core/gimp-transform-region.c
@@ -340,7 +340,8 @@ gimp_transform_region_nearest (TileManager *orig_tiles,
if (iu >= u1 && iu < u2 &&
iv >= v1 && iv < v2)
{
- read_pixel_data_1 (orig_tiles, iu - u1, iv - v1, d);
+ tile_manager_read_pixel_data_1 (orig_tiles, iu - u1, iv - v1,
+ d);
d += destPR->bytes;
}
@@ -857,16 +858,17 @@ sample_bi (TileManager *tm,
guchar C[4][4];
gint i;
- /* fill the color with default values, since read_pixel_data_1
- * does nothing, when accesses are out of bounds.
+ /* fill the color with default values, since
+ * tile_manager_read_pixel_data_1 does nothing, when accesses are
+ * out of bounds.
*/
for (i = 0; i < 4; i++)
*(guint*) (&C[i]) = *(guint*) (bg_color);
- read_pixel_data_1 (tm, x0, y0, C[0]);
- read_pixel_data_1 (tm, x1, y0, C[2]);
- read_pixel_data_1 (tm, x0, y1, C[1]);
- read_pixel_data_1 (tm, x1, y1, C[3]);
+ tile_manager_read_pixel_data_1 (tm, x0, y0, C[0]);
+ tile_manager_read_pixel_data_1 (tm, x1, y0, C[2]);
+ tile_manager_read_pixel_data_1 (tm, x0, y1, C[1]);
+ tile_manager_read_pixel_data_1 (tm, x1, y1, C[3]);
#define lerp(v1, v2, r) \
(((guint)(v1) * (FIXED_UNIT - (guint)(r)) + \
diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c
index f2f8edc..3d3842a 100644
--- a/app/core/gimpdrawable.c
+++ b/app/core/gimpdrawable.c
@@ -713,7 +713,8 @@ gimp_drawable_get_pixel_at (GimpPickable *pickable,
y < 0 || y >= gimp_item_get_height (GIMP_ITEM (drawable)))
return FALSE;
- read_pixel_data_1 (gimp_drawable_get_tiles (drawable), x, y, pixel);
+ tile_manager_read_pixel_data_1 (gimp_drawable_get_tiles (drawable), x, y,
+ pixel);
return TRUE;
}
diff --git a/app/core/gimpimagemap.c b/app/core/gimpimagemap.c
index 7a39e3e..605a5e6 100644
--- a/app/core/gimpimagemap.c
+++ b/app/core/gimpimagemap.c
@@ -300,10 +300,10 @@ gimp_image_map_get_pixel_at (GimpPickable *pickable,
if (x >= offset_x && x < offset_x + width &&
y >= offset_y && y < offset_y + height)
{
- read_pixel_data_1 (image_map->undo_tiles,
- x - offset_x,
- y - offset_y,
- pixel);
+ tile_manager_read_pixel_data_1 (image_map->undo_tiles,
+ x - offset_x,
+ y - offset_y,
+ pixel);
return TRUE;
}
diff --git a/app/core/gimpprojection.c b/app/core/gimpprojection.c
index 4eace41..54c7623 100644
--- a/app/core/gimpprojection.c
+++ b/app/core/gimpprojection.c
@@ -331,7 +331,7 @@ gimp_projection_get_pixel_at (GimpPickable *pickable,
y >= tile_manager_height (tiles))
return FALSE;
- read_pixel_data_1 (tiles, x, y, pixel);
+ tile_manager_read_pixel_data_1 (tiles, x, y, pixel);
return TRUE;
}
diff --git a/app/display/gimpcanvastransformpreview.c b/app/display/gimpcanvastransformpreview.c
index 8ceada3..875f59f 100644
--- a/app/display/gimpcanvastransformpreview.c
+++ b/app/display/gimpcanvastransformpreview.c
@@ -946,7 +946,7 @@ gimp_canvas_transform_preview_draw_tri_row (GimpDrawable *texture,
while (dx--)
{
- read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
+ tile_manager_read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
offset = pixel[0] + pixel[0] + pixel[0];
@@ -971,7 +971,7 @@ gimp_canvas_transform_preview_draw_tri_row (GimpDrawable *texture,
register gulong tmp;
guchar alpha;
- read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
+ tile_manager_read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
offset = pixel[0] + pixel[0] + pixel[0];
alpha = INT_MULT (opacity, pixel[1], tmp);
@@ -992,7 +992,7 @@ gimp_canvas_transform_preview_draw_tri_row (GimpDrawable *texture,
case GIMP_GRAY_IMAGE:
while (dx--)
{
- read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
+ tile_manager_read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
GIMP_CAIRO_ARGB32_SET_PIXEL (pptr,
pixel[0],
@@ -1013,7 +1013,7 @@ gimp_canvas_transform_preview_draw_tri_row (GimpDrawable *texture,
register gulong tmp;
guchar alpha;
- read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
+ tile_manager_read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
alpha = INT_MULT (opacity, pixel[1], tmp);
@@ -1033,7 +1033,7 @@ gimp_canvas_transform_preview_draw_tri_row (GimpDrawable *texture,
case GIMP_RGB_IMAGE:
while (dx--)
{
- read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
+ tile_manager_read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
GIMP_CAIRO_ARGB32_SET_PIXEL (pptr,
pixel[0],
@@ -1054,7 +1054,7 @@ gimp_canvas_transform_preview_draw_tri_row (GimpDrawable *texture,
register gulong tmp;
guchar alpha;
- read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
+ tile_manager_read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
alpha = INT_MULT (opacity, pixel[3], tmp);
@@ -1188,8 +1188,9 @@ gimp_canvas_transform_preview_draw_tri_row_mask (GimpDrawable *texture,
register gulong tmp;
guchar alpha;
- read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
- read_pixel_data_1 (masktiles, (gint) mu, (gint) mv, &maskval);
+ tile_manager_read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
+ tile_manager_read_pixel_data_1 (masktiles, (gint) mu, (gint) mv,
+ &maskval);
offset = pixel[0] + pixel[0] + pixel[0];
alpha = INT_MULT (opacity, maskval, tmp);
@@ -1217,8 +1218,9 @@ gimp_canvas_transform_preview_draw_tri_row_mask (GimpDrawable *texture,
register gulong tmp;
guchar alpha;
- read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
- read_pixel_data_1 (masktiles, (gint) mu, (gint) mv, &maskval);
+ tile_manager_read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
+ tile_manager_read_pixel_data_1 (masktiles, (gint) mu, (gint) mv,
+ &maskval);
offset = pixel[0] + pixel[0] + pixel[0];
alpha = INT_MULT3 (opacity, maskval, pixel[1], tmp);
@@ -1244,8 +1246,9 @@ gimp_canvas_transform_preview_draw_tri_row_mask (GimpDrawable *texture,
register gulong tmp;
guchar alpha;
- read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
- read_pixel_data_1 (masktiles, (gint) mu, (gint) mv, &maskval);
+ tile_manager_read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
+ tile_manager_read_pixel_data_1 (masktiles, (gint) mu, (gint) mv,
+ &maskval);
alpha = INT_MULT (opacity, maskval, tmp);
@@ -1270,8 +1273,9 @@ gimp_canvas_transform_preview_draw_tri_row_mask (GimpDrawable *texture,
register gulong tmp;
guchar alpha;
- read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
- read_pixel_data_1 (masktiles, (gint) mu, (gint) mv, &maskval);
+ tile_manager_read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
+ tile_manager_read_pixel_data_1 (masktiles, (gint) mu, (gint) mv,
+ &maskval);
alpha = INT_MULT3 (opacity, maskval, pixel[1], tmp);
@@ -1296,8 +1300,9 @@ gimp_canvas_transform_preview_draw_tri_row_mask (GimpDrawable *texture,
register gulong tmp;
guchar alpha;
- read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
- read_pixel_data_1 (masktiles, (gint) mu, (gint) mv, &maskval);
+ tile_manager_read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
+ tile_manager_read_pixel_data_1 (masktiles, (gint) mu, (gint) mv,
+ &maskval);
alpha = INT_MULT (opacity, maskval, tmp);
@@ -1322,8 +1327,9 @@ gimp_canvas_transform_preview_draw_tri_row_mask (GimpDrawable *texture,
register gulong tmp;
guchar alpha;
- read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
- read_pixel_data_1 (masktiles, (gint) mu, (gint) mv, &maskval);
+ tile_manager_read_pixel_data_1 (tiles, (gint) u, (gint) v, pixel);
+ tile_manager_read_pixel_data_1 (masktiles, (gint) mu, (gint) mv,
+ &maskval);
alpha = INT_MULT3 (opacity, maskval, pixel[3], tmp);
diff --git a/app/gimpcore.def b/app/gimpcore.def
index e65bb1f..2f7d5d4 100644
--- a/app/gimpcore.def
+++ b/app/gimpcore.def
@@ -620,7 +620,7 @@ EXPORTS
pixel_regions_process
pixel_regions_register
posterize_lut_setup
- read_pixel_data_1
+ tile_manager_read_pixel_data_1
temp_buf_data
temp_buf_data_clear
temp_buf_free
diff --git a/app/paint-funcs/scale-region.c b/app/paint-funcs/scale-region.c
index 2850439..aa39909 100644
--- a/app/paint-funcs/scale-region.c
+++ b/app/paint-funcs/scale-region.c
@@ -1013,7 +1013,8 @@ interpolate_nearest (TileManager *srcTM,
const gint x = (xfrac <= 0.5) ? x0 : x0 + 1;
const gint y = (yfrac <= 0.5) ? y0 : y0 + 1;
- read_pixel_data_1 (srcTM, CLAMP (x, 0, w), CLAMP (y, 0, h), pixel);
+ tile_manager_read_pixel_data_1 (srcTM, CLAMP (x, 0, w), CLAMP (y, 0, h),
+ pixel);
}
static inline gdouble
diff --git a/devel-docs/app/app-sections.txt b/devel-docs/app/app-sections.txt
index 2e1f232..2321f78 100644
--- a/devel-docs/app/app-sections.txt
+++ b/devel-docs/app/app-sections.txt
@@ -9114,10 +9114,10 @@ tile_manager_get_tile_coordinates
tile_manager_tiles_per_col
tile_manager_tiles_per_row
tile_manager_map_over_tile
-read_pixel_data
-write_pixel_data
-read_pixel_data_1
-write_pixel_data_1
+tile_manager_read_pixel_data
+tile_manager_write_pixel_data
+tile_manager_read_pixel_data_1
+tile_manager_write_pixel_data_1
</SECTION>
<SECTION>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]