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

This commit is contained in:
kmcclusk%netscape.com 2002-03-26 14:21:31 +00:00
parent bdeb4a5e64
commit 1945858afe

View file

@ -832,7 +832,12 @@ NS_IMETHODIMP nsImageWin::DrawTile(nsIRenderingContext &aContext,
} 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