Bug 1251806 - In RasterImage::GetFrameInternal(), check if the frame covers the actual surface size rather than the requested surface size. r=tn
authorSeth Fowler <mark.seth.fowler@gmail.com>
Mon, 07 Mar 2016 17:17:16 -0800
changeset 287109 8c056908523ec29f08db9d304bff71f5485a14f2
parent 287108 9314f8ddff7830e1cb4beb5450cb6ad2875bcdd2
child 287110 396e7cdc25393a818a8e3a07af49284655ad58a3
push id73057
push usermfowler@mozilla.com
push dateTue, 08 Mar 2016 01:30:19 +0000
treeherdermozilla-inbound@396e7cdc2539 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs1251806
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1251806 - In RasterImage::GetFrameInternal(), check if the frame covers the actual surface size rather than the requested surface size. r=tn
image/RasterImage.cpp
--- a/image/RasterImage.cpp
+++ b/image/RasterImage.cpp
@@ -594,17 +594,17 @@ RasterImage::GetFrameInternal(const IntS
     // The OS threw this frame away and we couldn't redecode it.
     return MakePair(DrawResult::TEMPORARY_ERROR, RefPtr<SourceSurface>());
   }
 
   // If this frame covers the entire image, we can just reuse its existing
   // surface.
   RefPtr<SourceSurface> frameSurf;
   if (!frameRef->NeedsPadding() &&
-      frameRef->GetSize() == aSize) {
+      frameRef->GetSize() == frameRef->GetImageSize()) {
     frameSurf = frameRef->GetSurface();
   }
 
   // The image doesn't have a usable surface because it's been optimized away or
   // because it's a partial update frame from an animation. Create one. (In this
   // case we fall back to returning a surface at our intrinsic size, even if a
   // different size was originally specified.)
   if (!frameSurf) {