mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 696579 - Round out mask, filter and pattern surfaces. r=roc
This commit is contained in:
parent
5c182f0204
commit
f0eafefb12
@ -169,8 +169,7 @@ nsSVGFE::SetupScalingFilter(nsSVGFilterInstance *aInstance,
|
||||
return result;
|
||||
|
||||
gfxRect r(aDataRect.x, aDataRect.y, aDataRect.width, aDataRect.height);
|
||||
r.Scale(gfxFloat(scaledSize.width)/aTarget->mImage->Width(),
|
||||
gfxFloat(scaledSize.height)/aTarget->mImage->Height());
|
||||
r.Scale(1 / kernelX, 1 / kernelY);
|
||||
r.RoundOut();
|
||||
if (!gfxUtils::GfxRectToIntRect(r, &result.mDataRect))
|
||||
return result;
|
||||
|
@ -1143,10 +1143,10 @@ gfxIntSize
|
||||
nsSVGUtils::ConvertToSurfaceSize(const gfxSize& aSize,
|
||||
bool *aResultOverflows)
|
||||
{
|
||||
gfxIntSize surfaceSize(ClampToInt(aSize.width), ClampToInt(aSize.height));
|
||||
gfxIntSize surfaceSize(ClampToInt(ceil(aSize.width)), ClampToInt(ceil(aSize.height)));
|
||||
|
||||
*aResultOverflows = surfaceSize.width != NS_round(aSize.width) ||
|
||||
surfaceSize.height != NS_round(aSize.height);
|
||||
*aResultOverflows = surfaceSize.width != ceil(aSize.width) ||
|
||||
surfaceSize.height != ceil(aSize.height);
|
||||
|
||||
if (!gfxASurface::CheckSurfaceSize(surfaceSize)) {
|
||||
surfaceSize.width = NS_MIN(NS_SVG_OFFSCREEN_MAX_DIMENSION,
|
||||
|
Loading…
Reference in New Issue
Block a user