Bug 1261964 - Specify the frame rect in input space, not output space, in nsIconDecoder. r=njn, a=sylvestre
authorSeth Fowler <mark.seth.fowler@gmail.com>
Wed, 25 May 2016 22:48:29 -0700
changeset 379414 3ff74bec4cc8e09bcc0b20c1a9a60a875336ff4a
parent 379413 61314f00fede1a8e67a27e8169df43af2cf8eddf
child 379415 70f81ba71a72ba4f901d6685e98bc12598fcb96e
push id21011
push usermak77@bonardo.net
push dateThu, 16 Jun 2016 13:40:45 +0000
reviewersnjn, sylvestre
bugs1261964
milestone48.0a2
Bug 1261964 - Specify the frame rect in input space, not output space, in nsIconDecoder. r=njn, a=sylvestre
image/decoders/nsIconDecoder.cpp
--- a/image/decoders/nsIconDecoder.cpp
+++ b/image/decoders/nsIconDecoder.cpp
@@ -71,21 +71,21 @@ nsIconDecoder::ReadHeader(const char* aD
 
   // If we're doing a metadata decode, we're done.
   if (IsMetadataDecode()) {
     return Transition::TerminateSuccess();
   }
 
   MOZ_ASSERT(!mImageData, "Already have a buffer allocated?");
   IntSize targetSize = mDownscaler ? mDownscaler->TargetSize() : GetSize();
-  IntRect targetFrameRect(IntPoint(0, 0), targetSize);
+  IntRect frameRect(IntPoint(0, 0), GetSize());
 
   Maybe<SurfacePipe> pipe =
     SurfacePipeFactory::CreateSurfacePipe(this, 0, GetSize(), targetSize,
-                                          targetFrameRect, SurfaceFormat::B8G8R8A8,
+                                          frameRect, SurfaceFormat::B8G8R8A8,
                                           SurfacePipeFlags());
   if (!pipe) {
     return Transition::TerminateFailure();
   }
 
   mPipe = Move(*pipe);
 
   MOZ_ASSERT(mImageData, "Should have a buffer now");