Eliminate unnecessary reference counting of gfxContext objects. b=433640 r+sr=roc

This commit is contained in:
L. David Baron 2008-06-03 15:25:31 -07:00
parent 752ec1f3fa
commit 6ce40d4252
6 changed files with 9 additions and 9 deletions

View File

@ -2805,7 +2805,7 @@ nsCSSRendering::PaintBorder(nsPresContext* aPresContext,
SF(" borderStyles: %d %d %d %d\n", borderStyles[0], borderStyles[1], borderStyles[2], borderStyles[3]);
// start drawing
nsRefPtr<gfxContext> ctx = aRenderingContext.ThebesContext();
gfxContext *ctx = aRenderingContext.ThebesContext();
ctx->Save();
@ -2995,7 +2995,7 @@ nsCSSRendering::PaintOutline(nsPresContext* aPresContext,
width / twipsPerPixel };
// start drawing
nsRefPtr<gfxContext> ctx = aRenderingContext.ThebesContext();
gfxContext *ctx = aRenderingContext.ThebesContext();
ctx->Save();
@ -3739,7 +3739,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
anchor.y += bgClipArea.y - aBorderArea.y;
}
nsRefPtr<gfxContext> ctx = aRenderingContext.ThebesContext();
gfxContext *ctx = aRenderingContext.ThebesContext();
ctx->Save();
nscoord appUnitsPerPixel = aPresContext->DevPixelsToAppUnits(1);
@ -4033,7 +4033,7 @@ nsCSSRendering::PaintRoundedBackground(nsPresContext* aPresContext,
nscoord aTheRadius[4],
PRBool aCanPaintNonWhite)
{
nsRefPtr<gfxContext> ctx = aRenderingContext.ThebesContext();
gfxContext *ctx = aRenderingContext.ThebesContext();
// needed for our border thickness
nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel();

View File

@ -2513,7 +2513,7 @@ nsLayoutUtils::DrawImage(nsIRenderingContext* aRenderingContext,
nsCOMPtr<nsIDeviceContext> dc;
aRenderingContext->GetDeviceContext(*getter_AddRefs(dc));
nsRefPtr<gfxContext> ctx = aRenderingContext->ThebesContext();
gfxContext *ctx = aRenderingContext->ThebesContext();
// the dest rect is affected by the current transform; that'll be
// handled by Image::Draw(), when we actually set up the rectangle.

View File

@ -5915,7 +5915,7 @@ nsBlockFrame::PaintTextDecorationLine(nsIRenderingContext& aRenderingContext,
// Only paint if we have a positive width
if (width > 0) {
nsRefPtr<gfxContext> ctx = aRenderingContext.ThebesContext();
gfxContext *ctx = aRenderingContext.ThebesContext();
gfxPoint pt(PresContext()->AppUnitsToGfxUnits(start + aPt.x),
PresContext()->AppUnitsToGfxUnits(aLine->mBounds.y + aPt.y));
gfxSize size(PresContext()->AppUnitsToGfxUnits(width), aSize);

View File

@ -795,7 +795,7 @@ void nsDisplaySelectionOverlay::Paint(nsDisplayListBuilder* aBuilder,
gfxRGBA c(color);
c.a = .5;
nsRefPtr<gfxContext> ctx = aCtx->ThebesContext();
gfxContext *ctx = aCtx->ThebesContext();
ctx->SetColor(c);
nsRect rect(aBuilder->ToReferenceFrame(mFrame), mFrame->GetSize());

View File

@ -239,7 +239,7 @@ nsHTMLContainerFrame::PaintTextDecorationLine(
}
}
nscoord innerWidth = mRect.width - bp.left - bp.right;
nsRefPtr<gfxContext> ctx = aRenderingContext.ThebesContext();
gfxContext *ctx = aRenderingContext.ThebesContext();
gfxPoint pt(PresContext()->AppUnitsToGfxUnits(bp.left + aPt.x),
PresContext()->AppUnitsToGfxUnits(bp.top + aPt.y));
gfxSize size(PresContext()->AppUnitsToGfxUnits(innerWidth), aSize);

View File

@ -1421,7 +1421,7 @@ nsObjectFrame::PaintPlugin(nsIRenderingContext& aRenderingContext,
* to tell the plugin where it is, we dispatch a NPWindow through
* |HandleEvent| to tell the plugin when its window moved
*/
nsRefPtr<gfxContext> ctx = aRenderingContext.ThebesContext();
gfxContext *ctx = aRenderingContext.ThebesContext();
gfxMatrix ctxMatrix = ctx->CurrentMatrix();
if (ctxMatrix.HasNonTranslation()) {
// soo; in the future, we should be able to render