Bug 801358 - Part 1 - Discard downscaled frames. r=jrmuizel
authorJoe Drew <joe@drew.ca>
Sat, 13 Oct 2012 22:17:30 -0400
changeset 110563 899b3dcf51a73d432326ff2cc75775adb426fd27
parent 110562 60f8112284ec8be298188d11f4fbed141da372c0
child 110564 4eb7de485ee86e75fe2353b004722824b43426c5
push id23700
push userryanvm@gmail.com
push dateThu, 18 Oct 2012 02:10:26 +0000
treeherdermozilla-central@5142bbd4da12 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs801358
milestone19.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 801358 - Part 1 - Discard downscaled frames. r=jrmuizel
image/src/RasterImage.cpp
--- a/image/src/RasterImage.cpp
+++ b/image/src/RasterImage.cpp
@@ -2401,16 +2401,20 @@ RasterImage::Discard(bool force)
   // For post-operation logging
   int old_frame_count = mFrames.Length();
 
   // Delete all the decoded frames, then clear the array.
   for (int i = 0; i < old_frame_count; ++i)
     delete mFrames[i];
   mFrames.Clear();
 
+  // Clear our downscaled frame.
+  mScaleResult.status = SCALE_INVALID;
+  mScaleResult.frame = nullptr;
+
   // Flag that we no longer have decoded frames for this image
   mDecoded = false;
 
   // Notify that we discarded
   nsCOMPtr<imgIDecoderObserver> observer(do_QueryReferent(mObserver));
   if (observer)
     observer->OnDiscard();