mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 86822 - gif spacer image detector was looking at uninitialized data;
animated gif spacer flag wasn't being updated. r=pavlov, sr=blizzard, a=dbaron
This commit is contained in:
parent
6df226985b
commit
1ab9af0ced
@ -1720,6 +1720,9 @@ NS_IMETHODIMP nsImageGTK::DrawToImage(nsIImage* aDstImage,
|
||||
|
||||
gdk_gc_unref(gc);
|
||||
|
||||
if (!mIsSpacer || !mAlphaDepth)
|
||||
dest->mIsSpacer = PR_FALSE;
|
||||
|
||||
// need to copy the mImageBits in case we're rendered scaled
|
||||
PRUint8 *scaledImage = 0, *scaledAlpha = 0;
|
||||
PRUint8 *rgbPtr=0, *alphaPtr=0;
|
||||
|
@ -535,10 +535,10 @@ int HaveDecodedRow(
|
||||
++rowBufIndex;
|
||||
}
|
||||
for (int i=0; i<aDuplicateCount; i++) {
|
||||
decoder->mImageFrame->SetImageData(decoder->mRGBLine,
|
||||
bpr, (aRowNumber+i)*bpr);
|
||||
decoder->mImageFrame->SetAlphaData(decoder->mAlphaLine,
|
||||
abpr, (aRowNumber+i)*abpr);
|
||||
decoder->mImageFrame->SetImageData(decoder->mRGBLine,
|
||||
bpr, (aRowNumber+i)*bpr);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -393,6 +393,11 @@ il_mng_refresh(mng_handle handle,
|
||||
*cptr++ = *row++;
|
||||
*cptr++ = *row++;
|
||||
}
|
||||
if (container->alpha)
|
||||
container->mFrame->SetAlphaData(container->alpha +
|
||||
y*container->mByteWidthAlpha,
|
||||
container->mByteWidthAlpha,
|
||||
abpr*y);
|
||||
container->mFrame->SetImageData(buf, bpr, bpr*y);
|
||||
#else
|
||||
container->mFrame->SetImageData(container->image +
|
||||
@ -400,12 +405,6 @@ il_mng_refresh(mng_handle handle,
|
||||
container->mByteWidth,
|
||||
bpr*y);
|
||||
#endif
|
||||
|
||||
if (container->alpha)
|
||||
container->mFrame->SetAlphaData(container->alpha +
|
||||
y*container->mByteWidthAlpha,
|
||||
container->mByteWidthAlpha,
|
||||
abpr*y);
|
||||
}
|
||||
#ifdef XP_MAC
|
||||
nsMemory::Free(buf);
|
||||
|
@ -460,8 +460,8 @@ row_callback(png_structp png_ptr, png_bytep new_row,
|
||||
aptr[x>>3] |= 1<<(7-x&0x7);
|
||||
}
|
||||
}
|
||||
decoder->mFrame->SetImageData(decoder->colorLine, bpr, row_num*bpr);
|
||||
decoder->mFrame->SetAlphaData(decoder->alphaLine, abpr, row_num*abpr);
|
||||
decoder->mFrame->SetImageData(decoder->colorLine, bpr, row_num*bpr);
|
||||
}
|
||||
break;
|
||||
case gfxIFormats::RGB_A8:
|
||||
@ -478,8 +478,8 @@ row_callback(png_structp png_ptr, png_bytep new_row,
|
||||
*cptr++ = *line++;
|
||||
*aptr++ = *line++;
|
||||
}
|
||||
decoder->mFrame->SetImageData(decoder->colorLine, bpr, row_num*bpr);
|
||||
decoder->mFrame->SetAlphaData(decoder->alphaLine, abpr, row_num*abpr);
|
||||
decoder->mFrame->SetImageData(decoder->colorLine, bpr, row_num*bpr);
|
||||
}
|
||||
break;
|
||||
case gfxIFormats::RGBA:
|
||||
@ -495,8 +495,8 @@ row_callback(png_structp png_ptr, png_bytep new_row,
|
||||
*cptr++ = *line++;
|
||||
*aptr++ = *line++;
|
||||
}
|
||||
decoder->mFrame->SetImageData(decoder->colorLine, bpr, row_num*bpr);
|
||||
decoder->mFrame->SetAlphaData(decoder->alphaLine, abpr, row_num*abpr);
|
||||
decoder->mFrame->SetImageData(decoder->colorLine, bpr, row_num*bpr);
|
||||
}
|
||||
#else
|
||||
decoder->mFrame->SetImageData(line, bpr, row_num*bpr);
|
||||
|
Loading…
Reference in New Issue
Block a user