From c035592fb5a686ebba87f7628f736a4a69c8c572 Mon Sep 17 00:00:00 2001 From: "dcone%netscape.com" Date: Fri, 11 Jun 1999 14:43:14 +0000 Subject: [PATCH] background Image speed up Commented out the box around the printout until Troy returns git-svn-id: svn://10.0.0.236/trunk@34797 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSRendering.cpp | 82 +++++++++++++++++-- .../layout/generic/nsSimplePageSequence.cpp | 7 +- .../html/base/src/nsSimplePageSequence.cpp | 7 +- .../layout/html/style/src/nsCSSRendering.cpp | 82 +++++++++++++++++-- 4 files changed, 164 insertions(+), 14 deletions(-) diff --git a/mozilla/layout/base/nsCSSRendering.cpp b/mozilla/layout/base/nsCSSRendering.cpp index 201799c9b76..e54823bfa25 100644 --- a/mozilla/layout/base/nsCSSRendering.cpp +++ b/mozilla/layout/base/nsCSSRendering.cpp @@ -53,6 +53,7 @@ enum ePathTypes{ }; static void GetPath(nsPoint aPoints[],nsPoint aPolyPath[],PRInt32 *aCurIndex,ePathTypes aPathType,PRInt32 &aC1Index,float aFrac=0); +static void TileImage(nsIRenderingContext& aRC,nsDrawingSurface aDS,nsRect &aSrcRect,PRInt16 aWidth,PRInt16 aHeight,PRInt32 aFlag); // Draw a line, skipping that portion which crosses aGap. aGap defines a rectangle gap @@ -1941,6 +1942,8 @@ nsStyleCoord borderRadius; // tile to account for dirtyRect.x. When tiling in x, the anchor.x value // will be a negative value used to adjust the starting coordinate. x0 = (dirtyRect.x / tileWidth) * tileWidth + anchor.x; + if(x0+tileWidthGetRect(pageBounds); pageBounds.Inflate(NSToCoordRound(p2t), NSToCoordRound(p2t)); - aRenderingContext.DrawRect(pageBounds); + + // this paints a rectangle around the for the printer output, + // which sometimes appears, other times + // goes away. I have to look into this further or ask troy.. + // I took it out for the time being to fix some bugs -- dwc + //aRenderingContext.DrawRect(pageBounds); } } diff --git a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp index 36ddf533faf..67abf96457c 100644 --- a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp +++ b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp @@ -328,7 +328,12 @@ nsSimplePageSequenceFrame::PaintChild(nsIPresContext& aPresContext, aRenderingContext.SetColor(NS_RGB(0, 0, 0)); aFrame->GetRect(pageBounds); pageBounds.Inflate(NSToCoordRound(p2t), NSToCoordRound(p2t)); - aRenderingContext.DrawRect(pageBounds); + + // this paints a rectangle around the for the printer output, + // which sometimes appears, other times + // goes away. I have to look into this further or ask troy.. + // I took it out for the time being to fix some bugs -- dwc + //aRenderingContext.DrawRect(pageBounds); } } diff --git a/mozilla/layout/html/style/src/nsCSSRendering.cpp b/mozilla/layout/html/style/src/nsCSSRendering.cpp index 201799c9b76..e54823bfa25 100644 --- a/mozilla/layout/html/style/src/nsCSSRendering.cpp +++ b/mozilla/layout/html/style/src/nsCSSRendering.cpp @@ -53,6 +53,7 @@ enum ePathTypes{ }; static void GetPath(nsPoint aPoints[],nsPoint aPolyPath[],PRInt32 *aCurIndex,ePathTypes aPathType,PRInt32 &aC1Index,float aFrac=0); +static void TileImage(nsIRenderingContext& aRC,nsDrawingSurface aDS,nsRect &aSrcRect,PRInt16 aWidth,PRInt16 aHeight,PRInt32 aFlag); // Draw a line, skipping that portion which crosses aGap. aGap defines a rectangle gap @@ -1941,6 +1942,8 @@ nsStyleCoord borderRadius; // tile to account for dirtyRect.x. When tiling in x, the anchor.x value // will be a negative value used to adjust the starting coordinate. x0 = (dirtyRect.x / tileWidth) * tileWidth + anchor.x; + if(x0+tileWidth