From d06afbe640ee1f4268591cf1a5141376fee2acdf Mon Sep 17 00:00:00 2001 From: Benoit Girard Date: Sat, 8 Oct 2011 00:03:47 -0400 Subject: [PATCH] Bug 526864 - Remove unused parameter aFrameToUse in RasterImage::DoComposite. r=bobbyholley --- modules/libpr0n/src/RasterImage.cpp | 13 ++----------- modules/libpr0n/src/RasterImage.h | 4 +--- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/modules/libpr0n/src/RasterImage.cpp b/modules/libpr0n/src/RasterImage.cpp index ac78b16a07cc..ae3d40353472 100644 --- a/modules/libpr0n/src/RasterImage.cpp +++ b/modules/libpr0n/src/RasterImage.cpp @@ -1525,10 +1525,8 @@ RasterImage::Notify(nsITimer *timer) } nsIntRect dirtyRect; - imgFrame *frameToUse = nsnull; if (nextFrameIndex == 0) { - frameToUse = nextFrame; dirtyRect = mAnim->firstFrameRefreshArea; } else { imgFrame *prevFrame = mFrames[previousFrameIndex]; @@ -1536,7 +1534,7 @@ RasterImage::Notify(nsITimer *timer) return NS_OK; // Change frame and announce it - if (NS_FAILED(DoComposite(&frameToUse, &dirtyRect, prevFrame, + if (NS_FAILED(DoComposite(&dirtyRect, prevFrame, nextFrame, nextFrameIndex))) { // something went wrong, move on to next NS_WARNING("RasterImage::Notify(): Composing Frame Failed\n"); @@ -1559,8 +1557,7 @@ RasterImage::Notify(nsITimer *timer) // DoComposite gets called when the timer for animation get fired and we have to // update the composited frame of the animation. nsresult -RasterImage::DoComposite(imgFrame** aFrameToUse, - nsIntRect* aDirtyRect, +RasterImage::DoComposite(nsIntRect* aDirtyRect, imgFrame* aPrevFrame, imgFrame* aNextFrame, PRInt32 aNextFrameIndex) @@ -1568,7 +1565,6 @@ RasterImage::DoComposite(imgFrame** aFrameToUse, NS_ENSURE_ARG_POINTER(aDirtyRect); NS_ENSURE_ARG_POINTER(aPrevFrame); NS_ENSURE_ARG_POINTER(aNextFrame); - NS_ENSURE_ARG_POINTER(aFrameToUse); PRInt32 prevFrameDisposalMethod = aPrevFrame->GetFrameDisposalMethod(); if (prevFrameDisposalMethod == kDisposeRestorePrevious && @@ -1597,7 +1593,6 @@ RasterImage::DoComposite(imgFrame** aFrameToUse, // whole image if (prevFrameDisposalMethod == kDisposeClearAll) { aDirtyRect->SetRect(0, 0, mSize.width, mSize.height); - *aFrameToUse = aNextFrame; return NS_OK; } @@ -1607,7 +1602,6 @@ RasterImage::DoComposite(imgFrame** aFrameToUse, (nextFrameDisposalMethod != kDisposeRestorePrevious) && !aNextFrame->GetHasAlpha()) { aDirtyRect->SetRect(0, 0, mSize.width, mSize.height); - *aFrameToUse = aNextFrame; return NS_OK; } } @@ -1648,7 +1642,6 @@ RasterImage::DoComposite(imgFrame** aFrameToUse, // On the second loop, we do not need to rebuild the frame // since it's still sitting in compositingFrame) if (mAnim->lastCompositedFrameIndex == aNextFrameIndex) { - *aFrameToUse = mAnim->compositingFrame; return NS_OK; } @@ -1817,13 +1810,11 @@ RasterImage::DoComposite(imgFrame** aFrameToUse, if (CopyFrameImage(mAnim->compositingFrame, aNextFrame)) { aPrevFrame->SetFrameDisposalMethod(kDisposeClearAll); mAnim->lastCompositedFrameIndex = -1; - *aFrameToUse = aNextFrame; return NS_OK; } } mAnim->lastCompositedFrameIndex = aNextFrameIndex; - *aFrameToUse = mAnim->compositingFrame; return NS_OK; } diff --git a/modules/libpr0n/src/RasterImage.h b/modules/libpr0n/src/RasterImage.h index 7318f48e1fa8..66b8e1f066a6 100644 --- a/modules/libpr0n/src/RasterImage.h +++ b/modules/libpr0n/src/RasterImage.h @@ -408,14 +408,12 @@ private: /** Function for doing the frame compositing of animations * - * @param aFrameToUse Set by DoComposite - * (aNextFrame, compositingFrame, or compositingPrevFrame) * @param aDirtyRect Area that the display will need to update * @param aPrevFrame Last Frame seen/processed * @param aNextFrame Frame we need to incorperate/display * @param aNextFrameIndex Position of aNextFrame in mFrames list */ - nsresult DoComposite(imgFrame** aFrameToUse, nsIntRect* aDirtyRect, + nsresult DoComposite(nsIntRect* aDirtyRect, imgFrame* aPrevFrame, imgFrame* aNextFrame, PRInt32 aNextFrameIndex);