Bug 1027093 - Rename int32_t mCurrentFrame in nsGIFDecoder2 to avoid mixups with parent class' imgFrame* mCurrentFrame. r=jmuizelaar
authorMilan Sreckovic <milan@mozilla.com>
Wed, 18 Jun 2014 10:54:59 -0400
changeset 190162 5e70b11b57c6d74f8164fd26a2865292e1c5f244
parent 190161 0c09da2ef5468437db4a38823c692ff5769f1a67
child 190163 3b965d005fb31d3a84ebfa1fdc791603f2c0e809
push id27001
push userkwierso@gmail.com
push dateTue, 24 Jun 2014 00:35:42 +0000
treeherdermozilla-central@984cd22ec8c3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmuizelaar
bugs1027093
milestone33.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 1027093 - Rename int32_t mCurrentFrame in nsGIFDecoder2 to avoid mixups with parent class' imgFrame* mCurrentFrame. r=jmuizelaar
image/decoders/nsGIFDecoder2.cpp
image/decoders/nsGIFDecoder2.h
--- a/image/decoders/nsGIFDecoder2.cpp
+++ b/image/decoders/nsGIFDecoder2.cpp
@@ -70,17 +70,17 @@ namespace image {
 //////////////////////////////////////////////////////////////////////
 // GIF Decoder Implementation
 
 nsGIFDecoder2::nsGIFDecoder2(RasterImage &aImage)
   : Decoder(aImage)
   , mCurrentRow(-1)
   , mLastFlushedRow(-1)
   , mOldColor(0)
-  , mCurrentFrame(-1)
+  , mCurrentFrameIndex(-1)
   , mCurrentPass(0)
   , mLastFlushedPass(0)
   , mGIFOpen(false)
   , mSawTransparency(false)
 {
   // Clear out the structure, excluding the arrays
   memset(&mGIFStruct, 0, sizeof(mGIFStruct));
 
@@ -100,17 +100,17 @@ nsGIFDecoder2::~nsGIFDecoder2()
 
 void
 nsGIFDecoder2::FinishInternal()
 {
   NS_ABORT_IF_FALSE(!HasError(), "Shouldn't call FinishInternal after error!");
 
   // If the GIF got cut off, handle it anyway
   if (!IsSizeDecode() && mGIFOpen) {
-    if (mCurrentFrame == mGIFStruct.images_decoded)
+    if (mCurrentFrameIndex == mGIFStruct.images_decoded)
       EndImageFrame();
     PostDecodeDone(mGIFStruct.loop_count - 1);
     mGIFOpen = false;
   }
 }
 
 // Push any new rows according to mCurrentPass/mLastFlushedPass and
 // mCurrentRow/mLastFlushedRow.  Note: caller is responsible for
@@ -188,17 +188,17 @@ void nsGIFDecoder2::BeginImageFrame(uint
                  format);
   } else {
     // Our preallocated frame matches up, with the possible exception of alpha.
     if (format == gfx::SurfaceFormat::B8G8R8X8) {
       GetCurrentFrame()->SetHasNoAlpha();
     }
   }
 
-  mCurrentFrame = mGIFStruct.images_decoded;
+  mCurrentFrameIndex = mGIFStruct.images_decoded;
 }
 
 
 //******************************************************************************
 void nsGIFDecoder2::EndImageFrame()
 {
   FrameBlender::FrameAlpha alpha = FrameBlender::kFrameHasAlpha;
 
@@ -246,17 +246,17 @@ void nsGIFDecoder2::EndImageFrame()
                 mGIFStruct.delay_time);
 
   // Reset the transparent pixel
   if (mOldColor) {
     mColormap[mGIFStruct.tpixel] = mOldColor;
     mOldColor = 0;
   }
 
-  mCurrentFrame = -1;
+  mCurrentFrameIndex = -1;
 }
 
 
 //******************************************************************************
 // Send the data to the display front-end.
 uint32_t nsGIFDecoder2::OutputRow()
 {
   int drow_start, drow_end;
--- a/image/decoders/nsGIFDecoder2.h
+++ b/image/decoders/nsGIFDecoder2.h
@@ -50,17 +50,17 @@ private:
 
   int32_t mCurrentRow;
   int32_t mLastFlushedRow;
 
   uint32_t mOldColor;        // The old value of the transparent pixel
 
   // The frame number of the currently-decoding frame when we're in the middle
   // of decoding it, and -1 otherwise.
-  int32_t mCurrentFrame;
+  int32_t mCurrentFrameIndex;
 
   uint8_t mCurrentPass;
   uint8_t mLastFlushedPass;
   uint8_t mColorMask;        // Apply this to the pixel to keep within colormap
   bool mGIFOpen;
   bool mSawTransparency;
 
   gif_struct mGIFStruct;