Bug 179546. Remove gs->transparent_pixel since it's not being used.

r=biesi sr=tor
This commit is contained in:
paper%animecity.nu 2002-11-28 05:50:49 +00:00
parent 4c82b1b099
commit f20302139c
2 changed files with 0 additions and 42 deletions

View File

@ -542,39 +542,6 @@ PRBool GIFInit(
return PR_TRUE;
}
/******************************************************************************/
static int gif_init_transparency(gif_struct* gs, int index)
{
GIF_IRGB *src_trans_pixel = gs->transparent_pixel;
GIF_IRGB *img_trans_pixel;
if (!src_trans_pixel) {
src_trans_pixel = PR_NEWZAP(GIF_IRGB);
if (!src_trans_pixel)
return PR_FALSE;
gs->transparent_pixel = src_trans_pixel;
/* Set the source image's transparent pixel color to be the preferred
transparency color of the destination image. */
img_trans_pixel = gs->transparent_pixel;
src_trans_pixel->red = img_trans_pixel->red;
src_trans_pixel->green = img_trans_pixel->green;
src_trans_pixel->blue = img_trans_pixel->blue;
}
return PR_TRUE;
}
//******************************************************************************
static void gif_destroy_transparency(gif_struct* gs)
{
if (gs->transparent_pixel) {
/* Destroy the source image's transparent pixel. */
PR_Free(gs->transparent_pixel);
gs->transparent_pixel = nsnull;
}
}
/* Maximum # of bytes to read ahead while waiting for delay_time to expire.
We no longer limit this number to remain within WIN16 malloc limitations
of 0xffff */
@ -835,12 +802,6 @@ PRStatus gif_write(gif_struct *gs, const PRUint8 *buf, PRUint32 len)
{
if (*q & 0x1) {
gs->tpixel = q[3];
if (!gif_init_transparency(gs, gs->tpixel)) {
gs->state = gif_oom;
break;
}
gs->is_transparent = PR_TRUE;
} else {
gs->is_transparent = PR_FALSE;
@ -1202,8 +1163,6 @@ void gif_destroy(gif_struct *gs)
if (gs->delay_time)
gs->delay_time = 0;
gif_destroy_transparency(gs);
PR_FREEIF(gs->rowbuf);
gif_free(gs->prefix);
gif_free(gs->suffix);

View File

@ -196,7 +196,6 @@ typedef struct gif_struct {
PRUintn last_height, last_width;
int interlaced; /* TRUE, if scanlines arrive interlaced order */
int tpixel; /* Index of transparent pixel */
GIF_IRGB* transparent_pixel;
int is_transparent; /* TRUE, if tpixel is valid */
int control_extension; /* TRUE, if image control extension present */
int is_local_colormap_defined;