mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 890179. r=seth a=abillings
--HG-- extra : rebase_source : f8c1f5adbdcc9bae652df901f256e8eac3fc5dc3
This commit is contained in:
parent
58b91b86f9
commit
a52cd51483
@ -177,10 +177,11 @@ void nsGIFDecoder2::BeginImageFrame(uint16_t aDepth)
|
||||
}
|
||||
|
||||
// Our first full frame is automatically created by the image decoding
|
||||
// infrastructure. Just use it as long as we're not creating a subframe.
|
||||
else if (mGIFStruct.x_offset != 0 || mGIFStruct.y_offset != 0 ||
|
||||
int32_t(mGIFStruct.width) != mImageMetadata.GetWidth() ||
|
||||
int32_t(mGIFStruct.height) != mImageMetadata.GetHeight()) {
|
||||
// infrastructure. Just use it as long as it matches up.
|
||||
else if (!GetCurrentFrame()->GetRect().IsEqualEdges(nsIntRect(mGIFStruct.x_offset,
|
||||
mGIFStruct.y_offset,
|
||||
mGIFStruct.width,
|
||||
mGIFStruct.height))) {
|
||||
// Regardless of depth of input, image is decoded into 24bit RGB
|
||||
NeedNewFrame(mGIFStruct.images_decoded, mGIFStruct.x_offset,
|
||||
mGIFStruct.y_offset, mGIFStruct.width, mGIFStruct.height,
|
||||
|
@ -141,11 +141,10 @@ void nsPNGDecoder::CreateFrame(png_uint_32 x_offset, png_uint_32 y_offset,
|
||||
gfxASurface::gfxImageFormat format)
|
||||
{
|
||||
// Our first full frame is automatically created by the image decoding
|
||||
// infrastructure. Just use it as long as we're not creating a subframe.
|
||||
// infrastructure. Just use it as long as it matches up.
|
||||
MOZ_ASSERT(HasSize());
|
||||
if (mNumFrames != 0 ||
|
||||
x_offset != 0 || y_offset != 0 ||
|
||||
width != mImageMetadata.GetWidth() || height != mImageMetadata.GetHeight()) {
|
||||
!GetCurrentFrame()->GetRect().IsEqualEdges(nsIntRect(x_offset, y_offset, width, height))) {
|
||||
NeedNewFrame(mNumFrames, x_offset, y_offset, width, height, format);
|
||||
} else if (mNumFrames == 0) {
|
||||
// Our preallocated frame matches up, with the possible exception of alpha.
|
||||
|
Loading…
Reference in New Issue
Block a user