From 984f2e4d5fc1bd4fb0477523d9c6a725865550ca Mon Sep 17 00:00:00 2001 From: "kmcclusk%netscape.com" Date: Tue, 26 Mar 2002 14:21:31 +0000 Subject: [PATCH] Fixed code which prevented the rendering of large animated background gifs. Return after the the call to PatBltTile only if PatBltTile returns PR_TRUE otherwise fall through to the slow tiling code. bug 133096 r=dcone sr=attinasi a=asa --- gfx/src/windows/nsImageWin.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gfx/src/windows/nsImageWin.cpp b/gfx/src/windows/nsImageWin.cpp index 499003e5e7b..5d035328d89 100644 --- a/gfx/src/windows/nsImageWin.cpp +++ b/gfx/src/windows/nsImageWin.cpp @@ -828,11 +828,16 @@ NS_IMETHODIMP nsImageWin::DrawTile(nsIRenderingContext &aContext, } else if ( (imageScaledWidth>MAX_BUFFER_WIDTH) || (imageScaledHeight>MAX_BUFFER_HEIGHT)) { if(PR_TRUE != gIsWinNT){ // CASE 2 -- THE PLATFORM IS NOT ON NT AND CAN NOT USE A PATBLT - useSlow = PR_TRUE; + useSlow = PR_TRUE; } else { if( (imageScaledWidth < MAX_BUFFER_WIDTH) || (imageScaledHeight < MAX_BUFFER_HEIGHT) ) { // CASE 3 -- THE PLATFORM IS ON NT AND WE HAVE ONE LARGE AND ONE SMALL WIDTH AND HEIGHT - return ( PatBltTile(aContext,aSurface,aX0,aY0,aX1,aY1) ); + if (PatBltTile(aContext,aSurface,aX0,aY0,aX1,aY1)) { + return(PR_TRUE); + } + // If PatBltTile returns PR_FALSE then we must drop through to the slow tiling + // code because either the width or height of the tiling buffer has been exceeded + useSlow = PR_TRUE; } else { // CASE 4 -- THE PLATFORM IS ON NT AND BOTH THE WIDTH AND HEIGHT ARE LARGE. // -- THIS IS AN ODD CASE.. SEEMS PATBLT WITH LARGER BRUSHES HAS A DIFFICULT TIME