mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1165185 - Nudge layer prescale to integers. r=roc
This commit is contained in:
parent
2e0f2286ad
commit
9456af6ff1
@ -4586,6 +4586,15 @@ static inline gfxSize RoundToFloatPrecision(const gfxSize& aSize)
|
||||
return gfxSize(float(aSize.width), float(aSize.height));
|
||||
}
|
||||
|
||||
static inline gfxSize NudgedToIntegerSize(const gfxSize& aSize)
|
||||
{
|
||||
float width = aSize.width;
|
||||
float height = aSize.height;
|
||||
gfx::NudgeToInteger(&width);
|
||||
gfx::NudgeToInteger(&height);
|
||||
return gfxSize(width, height);
|
||||
}
|
||||
|
||||
static void RestrictScaleToMaxLayerSize(gfxSize& aScale,
|
||||
const nsRect& aVisibleRect,
|
||||
nsIFrame* aContainerFrame,
|
||||
@ -4704,7 +4713,7 @@ ChooseScaleAndSetTransform(FrameLayerBuilder* aLayerBuilder,
|
||||
scale.height = gfxUtils::ClampToScaleFactor(scale.height);
|
||||
}
|
||||
} else {
|
||||
// XXX Do we need to move nearly-integer values to integers here?
|
||||
scale = NudgedToIntegerSize(scale);
|
||||
}
|
||||
}
|
||||
// If the scale factors are too small, just use 1.0. The content is being
|
||||
|
Loading…
Reference in New Issue
Block a user