mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 09:30:44 +00:00
SF1in #142422.
This commit is contained in:
parent
6730df8ced
commit
76b7869a6a
@ -706,7 +706,7 @@ gif_clear_screen(gif_struct *gs)
|
||||
int src_trans_pixel_index;
|
||||
uint8 *rowbuf = gs->rowbuf;
|
||||
NI_PixmapHeader *src_header = ic->src_header;
|
||||
IL_IRGB *saved_src_trans_pixel;
|
||||
IL_IRGB *saved_src_trans_pixel, *saved_img_trans_pixel;
|
||||
|
||||
/* Catch images that fall outside the logical screen. */
|
||||
if ((erase_x_offset + erase_width) > gs->screen_width)
|
||||
@ -714,12 +714,15 @@ gif_clear_screen(gif_struct *gs)
|
||||
|
||||
/* We have to temporarily pretend the image is transparent
|
||||
so we can clear using the context's background color. */
|
||||
saved_img_trans_pixel = ic->image->header.transparent_pixel;
|
||||
saved_src_trans_pixel = src_header->transparent_pixel;
|
||||
src_header->transparent_pixel = NULL;
|
||||
ic->image->header.transparent_pixel = NULL;
|
||||
|
||||
/* Pick an index for the source image's temporary transparent pixel.
|
||||
The actual choice is immaterial since it will only be used for
|
||||
the clear screen operation. */
|
||||
|
||||
src_trans_pixel_index = 0;
|
||||
if (!il_gif_init_transparency(ic, src_trans_pixel_index))
|
||||
return MK_OUT_OF_MEMORY;
|
||||
@ -739,6 +742,7 @@ gif_clear_screen(gif_struct *gs)
|
||||
/* Reset the source image's transparent pixel to its former state. */
|
||||
il_gif_destroy_transparency(ic);
|
||||
src_header->transparent_pixel = saved_src_trans_pixel;
|
||||
ic->image->header.transparent_pixel = saved_img_trans_pixel;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user