diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-04-29 18:59:31 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-06 10:26:29 +0200 |
commit | d2b72129add81abcfe5801197159d6a55adfe11e (patch) | |
tree | e6252ee90eddebc8acded0e054831e6addd38c74 | |
parent | 909aaf7dc7a487dd7570d2bf30e82708af477e50 (diff) | |
download | qtwebkit-d2b72129add81abcfe5801197159d6a55adfe11e.tar.gz |
Zooming transforms results in blurry backgrounds
An optimization to speedup pattern transforms results in blurry
background images when using CSS transforms.
This patch disables the optimization when QPainter already has a
transform, and the optimization would be both wrong and probably slower.
Test: svg/as-background-image/svg-transformed-background.html
Task-number: QTBUG-38588
Change-Id: I58739e21fd925048bc91f0ac973fae2036bcf713
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-rw-r--r-- | Source/WebCore/platform/graphics/qt/ImageQt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/qt/ImageQt.cpp b/Source/WebCore/platform/graphics/qt/ImageQt.cpp index ac47fcbd0..228518f66 100644 --- a/Source/WebCore/platform/graphics/qt/ImageQt.cpp +++ b/Source/WebCore/platform/graphics/qt/ImageQt.cpp @@ -163,7 +163,7 @@ void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const QTransform transform(patternTransform); // If this would draw more than one scaled tile, we scale the pixmap first and then use the result to draw. - if (transform.type() == QTransform::TxScale) { + if (transform.type() == QTransform::TxScale && p->transform().type() < QTransform::TxScale) { QRectF tileRectInTargetCoords = (transform * QTransform().translate(phase.x(), phase.y())).mapRect(tr); bool tileWillBePaintedOnlyOnce = tileRectInTargetCoords.contains(dr); |