| Index: Source/core/paint/ImagePainter.cpp
|
| diff --git a/Source/core/paint/ImagePainter.cpp b/Source/core/paint/ImagePainter.cpp
|
| index 04ebee1f5e6d0eee700066c2648c8239f05b760e..03a2b8645937eb9e9485a52d64184109ac29d344 100644
|
| --- a/Source/core/paint/ImagePainter.cpp
|
| +++ b/Source/core/paint/ImagePainter.cpp
|
| @@ -204,12 +204,14 @@ void ImagePainter::paintBoxDecorationBackground(PaintInfo& paintInfo, const Layo
|
| {
|
| // Don't anti-alias the background of an image. See crbug.com/423834 for the reason why.
|
| // However, don't turn off anti-aliasing for subclasses such as video.
|
| - bool shouldAntialias = !m_renderImage.isRenderImage();
|
| + // An additional mega-hack here is to turn off anti-aliasing only for situations with a large device scale factor
|
| + // The referenced bug gives more details about a device with a scale factor greater than 3.4).
|
| + bool shouldAntialias = !m_renderImage.isRenderImage() || blink::deviceScaleFactor(m_renderImage.frame()) < 3.4;
|
|
|
| bool oldShouldAntialias = paintInfo.context->shouldAntialias();
|
| -
|
| paintInfo.context->setShouldAntialias(shouldAntialias);
|
| BoxPainter(m_renderImage).paintBoxDecorationBackground(paintInfo, paintOffset);
|
| +
|
| paintInfo.context->setShouldAntialias(oldShouldAntialias);
|
| }
|
|
|
|
|