Commit 3bb2f799 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

inline tile_manager_get_tile_num().

2005-05-09  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager.c: inline tile_manager_get_tile_num().

	* app/display/gimpdisplayshell-render.c (render_image_tile_fault):
	reverted one of the changes I did here earlier.
parent 4b582207
2005-05-09 Sven Neumann <sven@gimp.org>
* app/base/tile-manager.c: inline tile_manager_get_tile_num().
* app/display/gimpdisplayshell-render.c (render_image_tile_fault):
reverted one of the changes I did here earlier.
2005-05-08 Sven Neumann <sven@gimp.org>
* app/dialogs/layer-options-dialog.c (layer_options_dialog_new):
......
......@@ -32,9 +32,17 @@
#include "tile-swap.h"
static gint tile_manager_get_tile_num (TileManager *tm,
gint xpixel,
gint ypixel);
static inline gint
tile_manager_get_tile_num (TileManager *tm,
gint xpixel,
gint ypixel)
{
if ((xpixel < 0) || (xpixel >= tm->width) ||
(ypixel < 0) || (ypixel >= tm->height))
return -1;
return (ypixel / TILE_HEIGHT) * tm->ntile_cols + (xpixel / TILE_WIDTH);
}
TileManager *
......@@ -116,7 +124,6 @@ tile_manager_unref (TileManager *tm)
}
}
void
tile_manager_set_validate_proc (TileManager *tm,
TileValidateProc proc)
......@@ -331,7 +338,6 @@ tile_manager_invalidate_tiles (TileManager *tm,
}
}
void
tile_invalidate_tile (Tile **tile_ptr,
TileManager *tm,
......@@ -350,7 +356,6 @@ tile_invalidate_tile (Tile **tile_ptr,
tile_invalidate (tile_ptr, tm, tile_num);
}
void
tile_invalidate (Tile **tile_ptr,
TileManager *tm,
......@@ -404,7 +409,6 @@ leave:
TILE_MUTEX_UNLOCK (tile);
}
void
tile_manager_map_tile (TileManager *tm,
gint xpixel,
......@@ -522,18 +526,6 @@ tile_manager_map (TileManager *tm,
#endif
}
static gint
tile_manager_get_tile_num (TileManager *tm,
gint xpixel,
gint ypixel)
{
if ((xpixel < 0) || (xpixel >= tm->width) ||
(ypixel < 0) || (ypixel >= tm->height))
return -1;
return (ypixel / TILE_HEIGHT) * tm->ntile_cols + (xpixel / TILE_WIDTH);
}
void
tile_manager_set_user_data (TileManager *tm,
gpointer user_data)
......@@ -665,7 +657,6 @@ tile_manager_get_tile_coordinates (TileManager *tm,
*y = TILE_HEIGHT * (tl->tile_num / tm->ntile_cols);
}
void
tile_manager_map_over_tile (TileManager *tm,
Tile *tile,
......
......@@ -973,8 +973,8 @@ render_image_tile_fault (RenderInfo *info)
tile = tile_manager_get_tile (info->src_tiles,
x, info->src_y, TRUE, FALSE);
g_return_val_if_fail (tile != NULL, tile_buf);
if (!tile)
return tile_buf;
src = tile_data_pointer (tile,
x % TILE_WIDTH,
......
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