mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
Bug 598798 patch 4: Remove hard-coded GraphicsFilter from nsLayoutUtils::DrawSingleUnscaledImage, and make its dirty-rect argument optional. r=roc a=blocking-betaN
This commit is contained in:
parent
9a8be12f1c
commit
890fc2ed6c
@ -3117,8 +3117,9 @@ nsLayoutUtils::DrawPixelSnapped(nsIRenderingContext* aRenderingContext,
|
||||
/* static */ nsresult
|
||||
nsLayoutUtils::DrawSingleUnscaledImage(nsIRenderingContext* aRenderingContext,
|
||||
imgIContainer* aImage,
|
||||
GraphicsFilter aGraphicsFilter,
|
||||
const nsPoint& aDest,
|
||||
const nsRect& aDirty,
|
||||
const nsRect* aDirty,
|
||||
PRUint32 aImageFlags,
|
||||
const nsRect* aSourceArea)
|
||||
{
|
||||
@ -3144,8 +3145,9 @@ nsLayoutUtils::DrawSingleUnscaledImage(nsIRenderingContext* aRenderingContext,
|
||||
// outside the image bounds, we want to honor the aSourceArea-to-aDest
|
||||
// translation but we don't want to actually tile the image.
|
||||
fill.IntersectRect(fill, dest);
|
||||
return DrawImageInternal(aRenderingContext, aImage, gfxPattern::FILTER_NEAREST,
|
||||
dest, fill, aDest, aDirty, imageSize, aImageFlags);
|
||||
return DrawImageInternal(aRenderingContext, aImage, aGraphicsFilter,
|
||||
dest, fill, aDest, aDirty ? *aDirty : dest,
|
||||
imageSize, aImageFlags);
|
||||
}
|
||||
|
||||
/* static */ nsresult
|
||||
|
@ -996,7 +996,8 @@ public:
|
||||
* app units.
|
||||
* @param aImage The image.
|
||||
* @param aDest The top-left where the image should be drawn
|
||||
* @param aDirty Pixels outside this area may be skipped.
|
||||
* @param aDirty If non-null, then pixels outside this area may
|
||||
* be skipped.
|
||||
* @param aImageFlags Image flags of the imgIContainer::FLAG_* variety
|
||||
* @param aSourceArea If non-null, this area is extracted from
|
||||
* the image and drawn at aDest. It's
|
||||
@ -1005,8 +1006,9 @@ public:
|
||||
*/
|
||||
static nsresult DrawSingleUnscaledImage(nsIRenderingContext* aRenderingContext,
|
||||
imgIContainer* aImage,
|
||||
GraphicsFilter aGraphicsFilter,
|
||||
const nsPoint& aDest,
|
||||
const nsRect& aDirty,
|
||||
const nsRect* aDirty,
|
||||
PRUint32 aImageFlags,
|
||||
const nsRect* aSourceArea = nsnull);
|
||||
|
||||
|
@ -3385,7 +3385,8 @@ nsTreeBodyFrame::PaintTwisty(PRInt32 aRowIndex,
|
||||
|
||||
// Paint the image.
|
||||
nsLayoutUtils::DrawSingleUnscaledImage(&aRenderingContext, image,
|
||||
pt, aDirtyRect, imgIContainer::FLAG_NONE, &imageSize);
|
||||
gfxPattern::FILTER_NEAREST, pt, &aDirtyRect,
|
||||
imgIContainer::FLAG_NONE, &imageSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3693,7 +3694,8 @@ nsTreeBodyFrame::PaintCheckbox(PRInt32 aRowIndex,
|
||||
|
||||
// Paint the image.
|
||||
nsLayoutUtils::DrawSingleUnscaledImage(&aRenderingContext, image,
|
||||
pt, aDirtyRect, imgIContainer::FLAG_NONE, &imageSize);
|
||||
gfxPattern::FILTER_NEAREST, pt, &aDirtyRect,
|
||||
imgIContainer::FLAG_NONE, &imageSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user