mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 526864 - Remove unused parameter aFrameToUse in RasterImage::DoComposite. r=bobbyholley
This commit is contained in:
parent
2a2d0d21c2
commit
d06afbe640
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user