Commit 928b4f23 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

removed redundant check.

2005-04-27  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager.c (tile_manager_get_tile): removed
	redundant check.

	* app/display/gimpdisplayshell-render.c: don't access the next
	tile if we are at the end of the render loop anyway.
parent 1b142e3b
2005-04-27 Sven Neumann <sven@gimp.org>
* app/base/tile-manager.c (tile_manager_get_tile): removed
redundant check.
* app/display/gimpdisplayshell-render.c: don't access the next
tile if we are at the end of the render loop anyway.
2005-04-27 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-render.c: removed unused byte_order
......
......@@ -134,15 +134,11 @@ tile_manager_get_tile (TileManager *tm,
gint wantread,
gint wantwrite)
{
gint tile_num;
g_return_val_if_fail (tm != NULL, NULL);
tile_num = tile_manager_get_tile_num (tm, xpixel, ypixel);
if (tile_num < 0)
return NULL;
return tile_manager_get (tm, tile_num, wantread, wantwrite);
return tile_manager_get (tm,
tile_manager_get_tile_num (tm, xpixel, ypixel),
wantread, wantwrite);
}
Tile *
......
......@@ -481,7 +481,7 @@ render_image_indexed (RenderInfo *info)
initial = FALSE;
if (error >= 1)
if (error >= 1 && y + 1 < ye)
{
info->src_y += error;
info->src = render_image_tile_fault (info);
......@@ -561,7 +561,7 @@ render_image_indexed_a (RenderInfo *info)
initial = FALSE;
if (error >= 1)
if (error >= 1 && y + 1 < ye)
{
info->src_y += error;
info->src = render_image_tile_fault (info);
......@@ -616,7 +616,7 @@ render_image_gray (RenderInfo *info)
initial = FALSE;
if (error >= 1)
if (error >= 1 && y + 1 < ye)
{
info->src_y += error;
info->src = render_image_tile_fault (info);
......@@ -684,7 +684,7 @@ render_image_gray_a (RenderInfo *info)
initial = FALSE;
if (error >= 1)
if (error >= 1 && y + 1 < ye)
{
info->src_y += error;
info->src = render_image_tile_fault (info);
......@@ -726,7 +726,7 @@ render_image_rgb (RenderInfo *info)
initial = FALSE;
if (error >= 1)
if (error >= 1 && y + 1 < ye)
{
info->src_y += error;
info->src = render_image_tile_fault (info);
......@@ -801,7 +801,7 @@ render_image_rgb_a (RenderInfo *info)
initial = FALSE;
if (error >= 1)
if (error >= 1 && y + 1 < ye)
{
info->src_y += error;
info->src = render_image_tile_fault (info);
......@@ -904,7 +904,7 @@ render_image_tile_fault (RenderInfo *info)
tile = tile_manager_get_tile (info->src_tiles,
info->src_x, info->src_y, TRUE, FALSE);
g_return_val_if_fail (tile != NULL);
g_return_val_if_fail (tile != NULL, tile_buf);
data = tile_data_pointer (tile,
info->src_x % TILE_WIDTH,
......@@ -937,8 +937,7 @@ render_image_tile_fault (RenderInfo *info)
tile = tile_manager_get_tile (info->src_tiles,
x, info->src_y, TRUE, FALSE);
if (! tile)
return tile_buf;
g_return_val_if_fail (tile != NULL, tile_buf);
data = 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