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.
This commit is contained in:
BST 1999 Adam D. Moss 1999-05-16 16:25:20 +00:00 committed by Adam D. Moss
parent 9a7d2ce57b
commit 5fc293e664
3 changed files with 17 additions and 14 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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 */
opacity_quickskip_possible = ((!m) && (opacity==255));
/* if (src2->tiles)
s2 = tile_data_pointer(src2->curtile,
src2->offx,
src2->offy);*/
/* 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 (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))
{

View File

@ -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 */
opacity_quickskip_possible = ((!m) && (opacity==255));
/* if (src2->tiles)
s2 = tile_data_pointer(src2->curtile,
src2->offx,
src2->offy);*/
/* 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 (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))
{