b=148598 Very Slow scrolling. r=rods sr=kin a=asa. Fixed the update area for the background images. Improves scrolling 100%

This commit is contained in:
dcone%netscape.com 2002-07-29 13:28:32 +00:00
parent f7fbe2b3e5
commit 2aed7eb5c6
2 changed files with 8 additions and 10 deletions

View File

@ -3113,14 +3113,13 @@ nsCSSRendering::PaintBackgroundWithSC(nsIPresContext* aPresContext,
y1 = y0 + tileHeight;
}
// Take the intersection again to paint only the required area
nsRect tileRect(x0,y0,(x1-x0),(y1-y0));
#ifdef XP_WIN
PRInt32 xOffset = tileRect.x - x0,
yOffset = tileRect.y - y0;
aRenderingContext.DrawTile(image,xOffset,yOffset,&tileRect);
PRInt32 xOffset = dirtyRect.x - x0,
yOffset = dirtyRect.y - y0;
aRenderingContext.DrawTile(image,xOffset,yOffset,&dirtyRect);
#else
nsRect drawRect;
nsRect tileRect(x0,y0,(x1-x0),(y1-y0));
if (drawRect.IntersectRect(tileRect, dirtyRect)) {
PRInt32 xOffset = drawRect.x - x0,

View File

@ -3113,14 +3113,13 @@ nsCSSRendering::PaintBackgroundWithSC(nsIPresContext* aPresContext,
y1 = y0 + tileHeight;
}
// Take the intersection again to paint only the required area
nsRect tileRect(x0,y0,(x1-x0),(y1-y0));
#ifdef XP_WIN
PRInt32 xOffset = tileRect.x - x0,
yOffset = tileRect.y - y0;
aRenderingContext.DrawTile(image,xOffset,yOffset,&tileRect);
PRInt32 xOffset = dirtyRect.x - x0,
yOffset = dirtyRect.y - y0;
aRenderingContext.DrawTile(image,xOffset,yOffset,&dirtyRect);
#else
nsRect drawRect;
nsRect tileRect(x0,y0,(x1-x0),(y1-y0));
if (drawRect.IntersectRect(tileRect, dirtyRect)) {
PRInt32 xOffset = drawRect.x - x0,