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 333141 3ff74bec4cc8e09bcc0b20c1a9a60a875336ff4a
parent 333140 61314f00fede1a8e67a27e8169df43af2cf8eddf
child 333142 70f81ba71a72ba4f901d6685e98bc12598fcb96e
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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");