mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 672578 - Part 1. Don't trigger a decode when FrameUpdated is called. r=joe
This commit is contained in:
parent
1800d8f336
commit
ea250e229a
@ -452,11 +452,8 @@ RasterImage::GetType()
|
||||
}
|
||||
|
||||
imgFrame*
|
||||
RasterImage::GetImgFrame(PRUint32 framenum)
|
||||
RasterImage::GetImgFrameNoDecode(PRUint32 framenum)
|
||||
{
|
||||
nsresult rv = WantDecodedFrames();
|
||||
CONTAINER_ENSURE_TRUE(NS_SUCCEEDED(rv), nsnull);
|
||||
|
||||
if (!mAnim) {
|
||||
NS_ASSERTION(framenum == 0, "Don't ask for a frame > 0 if we're not animated!");
|
||||
return mFrames.SafeElementAt(0, nsnull);
|
||||
@ -466,6 +463,14 @@ RasterImage::GetImgFrame(PRUint32 framenum)
|
||||
return mFrames.SafeElementAt(framenum, nsnull);
|
||||
}
|
||||
|
||||
imgFrame*
|
||||
RasterImage::GetImgFrame(PRUint32 framenum)
|
||||
{
|
||||
nsresult rv = WantDecodedFrames();
|
||||
CONTAINER_ENSURE_TRUE(NS_SUCCEEDED(rv), nsnull);
|
||||
return GetImgFrameNoDecode(framenum);
|
||||
}
|
||||
|
||||
imgFrame*
|
||||
RasterImage::GetDrawableImgFrame(PRUint32 framenum)
|
||||
{
|
||||
@ -979,7 +984,7 @@ RasterImage::FrameUpdated(PRUint32 aFrameNum, nsIntRect &aUpdatedRect)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(aFrameNum < mFrames.Length(), "Invalid frame index!");
|
||||
|
||||
imgFrame *frame = GetImgFrame(aFrameNum);
|
||||
imgFrame *frame = GetImgFrameNoDecode(aFrameNum);
|
||||
NS_ABORT_IF_FALSE(frame, "Calling FrameUpdated on frame that doesn't exist!");
|
||||
|
||||
frame->ImageUpdated(aUpdatedRect);
|
||||
|
@ -375,6 +375,7 @@ private:
|
||||
*/
|
||||
void DeleteImgFrame(PRUint32 framenum);
|
||||
|
||||
imgFrame* GetImgFrameNoDecode(PRUint32 framenum);
|
||||
imgFrame* GetImgFrame(PRUint32 framenum);
|
||||
imgFrame* GetDrawableImgFrame(PRUint32 framenum);
|
||||
imgFrame* GetCurrentImgFrame();
|
||||
|
Loading…
Reference in New Issue
Block a user