mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 612042: Set extend mode properly for integer translations. r=joedrew a=blocking-betan
This commit is contained in:
parent
8214a72452
commit
355708a54f
@ -155,14 +155,22 @@ gfxSurfaceDrawable::Draw(gfxContext* aContext,
|
||||
if (aRepeat) {
|
||||
pattern->SetExtend(gfxPattern::EXTEND_REPEAT);
|
||||
pattern->SetFilter(aFilter);
|
||||
} else if (aContext->CurrentMatrix().HasNonIntegerTranslation() ||
|
||||
aTransform.HasNonIntegerTranslation()) {
|
||||
} else {
|
||||
gfxPattern::GraphicsFilter filter = aFilter;
|
||||
if (aContext->CurrentMatrix().HasOnlyIntegerTranslation() &&
|
||||
aTransform.HasOnlyIntegerTranslation())
|
||||
{
|
||||
// If we only have integer translation, no special filtering needs to
|
||||
// happen and we explicitly use FILTER_FAST. This is fast for some
|
||||
// backends.
|
||||
filter = gfxPattern::FILTER_FAST;
|
||||
}
|
||||
nsRefPtr<gfxASurface> currentTarget = aContext->CurrentSurface();
|
||||
gfxASurface::gfxSurfaceType surfaceType = currentTarget->GetType();
|
||||
gfxMatrix deviceSpaceToImageSpace =
|
||||
DeviceToImageTransform(aContext, aTransform);
|
||||
PreparePatternForUntiledDrawing(pattern, deviceSpaceToImageSpace,
|
||||
surfaceType, currentTarget, aFilter);
|
||||
surfaceType, currentTarget, filter);
|
||||
}
|
||||
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
|
||||
pattern->SetFilter(gfxPattern::FILTER_FAST);
|
||||
|
Loading…
Reference in New Issue
Block a user