From 3c1a9580ee43e085cb5ef2b88f4d254120131396 Mon Sep 17 00:00:00 2001 From: Edwin Flores Date: Tue, 29 Dec 2015 18:19:27 -0500 Subject: [PATCH] Bug 1229825 - Make GIF deinterlacer respect the frame rect bounds. r=tn --- image/Downscaler.h | 1 + image/decoders/nsGIFDecoder2.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/image/Downscaler.h b/image/Downscaler.h index 64ab1fe91137..cc5e1f67f1c9 100644 --- a/image/Downscaler.h +++ b/image/Downscaler.h @@ -58,6 +58,7 @@ public: const nsIntSize& OriginalSize() const { return mOriginalSize; } const nsIntSize& TargetSize() const { return mTargetSize; } + const nsIntSize FrameSize() const { return nsIntSize(mFrameRect.width, mFrameRect.height); } const gfxSize& Scale() const { return mScale; } /** diff --git a/image/decoders/nsGIFDecoder2.cpp b/image/decoders/nsGIFDecoder2.cpp index 799f05be3e9e..d24b47aa1660 100644 --- a/image/decoders/nsGIFDecoder2.cpp +++ b/image/decoders/nsGIFDecoder2.cpp @@ -1177,7 +1177,7 @@ nsGIFDecoder2::WriteInternal(const char* aBuffer, uint32_t aCount) mGIFStruct.interlaced = true; mGIFStruct.ipass = 1; if (mDownscaler) { - mDeinterlacer.emplace(mDownscaler->OriginalSize()); + mDeinterlacer.emplace(mDownscaler->FrameSize()); } } else { mGIFStruct.interlaced = false;