Commit 5fc293e6 authored by BST 1999  Adam D. Moss's avatar BST 1999 Adam D. Moss Committed by Adam D. Moss
Browse files

Fixed a possible bad composite when mode is REPLACE_MODE.

Sun May 16 17:16:59 BST 1999  Adam D. Moss  <adam@gimp.org>

	* app/paint_funcs.c: Fixed a possible bad composite when
	mode is REPLACE_MODE.
parent 9a7d2ce5
Sun May 16 17:16:59 BST 1999 Adam D. Moss <adam@gimp.org>
* app/paint_funcs.c: Fixed a possible bad composite when
mode is REPLACE_MODE.
1999-05-15 Scott Goehring <scott@poverty.bloomington.in.us>
* app/about_dialog.c: Removed unnecessarly #include of
......
......@@ -5130,6 +5130,7 @@ combine_sub_region(struct combine_regions_struct *st,
unsigned char * d, * m;
unsigned char buf[512];
gboolean opacity_quickskip_possible;
gboolean transparency_quickskip_possible;
TileRowHint hint;
opacity = st->opacity;
......@@ -5145,13 +5146,11 @@ combine_sub_region(struct combine_regions_struct *st,
d = dest->data;
m = (mask) ? mask->data : NULL;
/* cheap and easy when the row of src2 is completely opaque */
/* cheap and easy when the row of src2 is completely opaque/transparent */
opacity_quickskip_possible = ((!m) && (opacity==255));
transparency_quickskip_possible = ((src2->tiles) && (mode != REPLACE_MODE));
/* if (src2->tiles)
s2 = tile_data_pointer(src2->curtile,
src2->offx,
src2->offy);*/
if (src1->w > 128)
g_error("combine_sub_region::src1->w = %d\n", src1->w);
......@@ -5173,7 +5172,7 @@ combine_sub_region(struct combine_regions_struct *st,
{
hint = TILEROWHINT_UNDEFINED;
if (src2->tiles &&
if (transparency_quickskip_possible &&
((hint = tile_get_rowhint (src2->curtile, (src2->offy + h))) ==
TILEROWHINT_TRANSPARENT))
{
......
......@@ -5130,6 +5130,7 @@ combine_sub_region(struct combine_regions_struct *st,
unsigned char * d, * m;
unsigned char buf[512];
gboolean opacity_quickskip_possible;
gboolean transparency_quickskip_possible;
TileRowHint hint;
opacity = st->opacity;
......@@ -5145,13 +5146,11 @@ combine_sub_region(struct combine_regions_struct *st,
d = dest->data;
m = (mask) ? mask->data : NULL;
/* cheap and easy when the row of src2 is completely opaque */
/* cheap and easy when the row of src2 is completely opaque/transparent */
opacity_quickskip_possible = ((!m) && (opacity==255));
transparency_quickskip_possible = ((src2->tiles) && (mode != REPLACE_MODE));
/* if (src2->tiles)
s2 = tile_data_pointer(src2->curtile,
src2->offx,
src2->offy);*/
if (src1->w > 128)
g_error("combine_sub_region::src1->w = %d\n", src1->w);
......@@ -5173,7 +5172,7 @@ combine_sub_region(struct combine_regions_struct *st,
{
hint = TILEROWHINT_UNDEFINED;
if (src2->tiles &&
if (transparency_quickskip_possible &&
((hint = tile_get_rowhint (src2->curtile, (src2->offy + h))) ==
TILEROWHINT_TRANSPARENT))
{
......
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