mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +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;
|
nsIntRect dirtyRect;
|
||||||
imgFrame *frameToUse = nsnull;
|
|
||||||
|
|
||||||
if (nextFrameIndex == 0) {
|
if (nextFrameIndex == 0) {
|
||||||
frameToUse = nextFrame;
|
|
||||||
dirtyRect = mAnim->firstFrameRefreshArea;
|
dirtyRect = mAnim->firstFrameRefreshArea;
|
||||||
} else {
|
} else {
|
||||||
imgFrame *prevFrame = mFrames[previousFrameIndex];
|
imgFrame *prevFrame = mFrames[previousFrameIndex];
|
||||||
@ -1536,7 +1534,7 @@ RasterImage::Notify(nsITimer *timer)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
// Change frame and announce it
|
// Change frame and announce it
|
||||||
if (NS_FAILED(DoComposite(&frameToUse, &dirtyRect, prevFrame,
|
if (NS_FAILED(DoComposite(&dirtyRect, prevFrame,
|
||||||
nextFrame, nextFrameIndex))) {
|
nextFrame, nextFrameIndex))) {
|
||||||
// something went wrong, move on to next
|
// something went wrong, move on to next
|
||||||
NS_WARNING("RasterImage::Notify(): Composing Frame Failed\n");
|
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
|
// DoComposite gets called when the timer for animation get fired and we have to
|
||||||
// update the composited frame of the animation.
|
// update the composited frame of the animation.
|
||||||
nsresult
|
nsresult
|
||||||
RasterImage::DoComposite(imgFrame** aFrameToUse,
|
RasterImage::DoComposite(nsIntRect* aDirtyRect,
|
||||||
nsIntRect* aDirtyRect,
|
|
||||||
imgFrame* aPrevFrame,
|
imgFrame* aPrevFrame,
|
||||||
imgFrame* aNextFrame,
|
imgFrame* aNextFrame,
|
||||||
PRInt32 aNextFrameIndex)
|
PRInt32 aNextFrameIndex)
|
||||||
@ -1568,7 +1565,6 @@ RasterImage::DoComposite(imgFrame** aFrameToUse,
|
|||||||
NS_ENSURE_ARG_POINTER(aDirtyRect);
|
NS_ENSURE_ARG_POINTER(aDirtyRect);
|
||||||
NS_ENSURE_ARG_POINTER(aPrevFrame);
|
NS_ENSURE_ARG_POINTER(aPrevFrame);
|
||||||
NS_ENSURE_ARG_POINTER(aNextFrame);
|
NS_ENSURE_ARG_POINTER(aNextFrame);
|
||||||
NS_ENSURE_ARG_POINTER(aFrameToUse);
|
|
||||||
|
|
||||||
PRInt32 prevFrameDisposalMethod = aPrevFrame->GetFrameDisposalMethod();
|
PRInt32 prevFrameDisposalMethod = aPrevFrame->GetFrameDisposalMethod();
|
||||||
if (prevFrameDisposalMethod == kDisposeRestorePrevious &&
|
if (prevFrameDisposalMethod == kDisposeRestorePrevious &&
|
||||||
@ -1597,7 +1593,6 @@ RasterImage::DoComposite(imgFrame** aFrameToUse,
|
|||||||
// whole image
|
// whole image
|
||||||
if (prevFrameDisposalMethod == kDisposeClearAll) {
|
if (prevFrameDisposalMethod == kDisposeClearAll) {
|
||||||
aDirtyRect->SetRect(0, 0, mSize.width, mSize.height);
|
aDirtyRect->SetRect(0, 0, mSize.width, mSize.height);
|
||||||
*aFrameToUse = aNextFrame;
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1607,7 +1602,6 @@ RasterImage::DoComposite(imgFrame** aFrameToUse,
|
|||||||
(nextFrameDisposalMethod != kDisposeRestorePrevious) &&
|
(nextFrameDisposalMethod != kDisposeRestorePrevious) &&
|
||||||
!aNextFrame->GetHasAlpha()) {
|
!aNextFrame->GetHasAlpha()) {
|
||||||
aDirtyRect->SetRect(0, 0, mSize.width, mSize.height);
|
aDirtyRect->SetRect(0, 0, mSize.width, mSize.height);
|
||||||
*aFrameToUse = aNextFrame;
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1648,7 +1642,6 @@ RasterImage::DoComposite(imgFrame** aFrameToUse,
|
|||||||
// On the second loop, we do not need to rebuild the frame
|
// On the second loop, we do not need to rebuild the frame
|
||||||
// since it's still sitting in compositingFrame)
|
// since it's still sitting in compositingFrame)
|
||||||
if (mAnim->lastCompositedFrameIndex == aNextFrameIndex) {
|
if (mAnim->lastCompositedFrameIndex == aNextFrameIndex) {
|
||||||
*aFrameToUse = mAnim->compositingFrame;
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1817,13 +1810,11 @@ RasterImage::DoComposite(imgFrame** aFrameToUse,
|
|||||||
if (CopyFrameImage(mAnim->compositingFrame, aNextFrame)) {
|
if (CopyFrameImage(mAnim->compositingFrame, aNextFrame)) {
|
||||||
aPrevFrame->SetFrameDisposalMethod(kDisposeClearAll);
|
aPrevFrame->SetFrameDisposalMethod(kDisposeClearAll);
|
||||||
mAnim->lastCompositedFrameIndex = -1;
|
mAnim->lastCompositedFrameIndex = -1;
|
||||||
*aFrameToUse = aNextFrame;
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mAnim->lastCompositedFrameIndex = aNextFrameIndex;
|
mAnim->lastCompositedFrameIndex = aNextFrameIndex;
|
||||||
*aFrameToUse = mAnim->compositingFrame;
|
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -408,14 +408,12 @@ private:
|
|||||||
|
|
||||||
/** Function for doing the frame compositing of animations
|
/** 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 aDirtyRect Area that the display will need to update
|
||||||
* @param aPrevFrame Last Frame seen/processed
|
* @param aPrevFrame Last Frame seen/processed
|
||||||
* @param aNextFrame Frame we need to incorperate/display
|
* @param aNextFrame Frame we need to incorperate/display
|
||||||
* @param aNextFrameIndex Position of aNextFrame in mFrames list
|
* @param aNextFrameIndex Position of aNextFrame in mFrames list
|
||||||
*/
|
*/
|
||||||
nsresult DoComposite(imgFrame** aFrameToUse, nsIntRect* aDirtyRect,
|
nsresult DoComposite(nsIntRect* aDirtyRect,
|
||||||
imgFrame* aPrevFrame,
|
imgFrame* aPrevFrame,
|
||||||
imgFrame* aNextFrame,
|
imgFrame* aNextFrame,
|
||||||
PRInt32 aNextFrameIndex);
|
PRInt32 aNextFrameIndex);
|
||||||
|
Loading…
Reference in New Issue
Block a user