qtwebkit/0004-Qt-Images-scaled-poorl...

67 lines
2.8 KiB
Diff

From b2a2856f9102515e9a9a048655f08d9c8152b179 Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@digia.com>
Date: Mon, 9 Sep 2013 15:00:54 +0200
Subject: [PATCH 4/9] [Qt] Images scaled poorly on composited canvas
https://bugs.webkit.org/show_bug.cgi?id=120632
Reviewed by Jocelyn Turcotte.
Explicitly set a imageInterpolationQuality on the TextureMapper, because
InterpolationDefault may be interpreted differently by nested GraphicsContexts.
* WebCoreSupport/TextureMapperLayerClientQt.cpp:
(TextureMapperLayerClientQt::renderCompositedLayers):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
---
Source/WebKit/qt/Api/qwebframe.cpp | 9 ++++++++-
Source/WebKit/qt/ChangeLog | 13 +++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/Source/WebKit/qt/Api/qwebframe.cpp b/Source/WebKit/qt/Api/qwebframe.cpp
index 6205a9c..b54b9c0 100644
--- a/Source/WebKit/qt/Api/qwebframe.cpp
+++ b/Source/WebKit/qt/Api/qwebframe.cpp
@@ -234,7 +234,14 @@ void QWebFramePrivate::renderCompositedLayers(GraphicsContext* context, const In
return;
textureMapper->setGraphicsContext(context);
- textureMapper->setImageInterpolationQuality(context->imageInterpolationQuality());
+ // GraphicsContext::imageInterpolationQuality is always InterpolationDefault here,
+ // but 'default' may be interpreted differently due to a different backend QPainter,
+ // so we need to set an explicit imageInterpolationQuality.
+ if (context->platformContext()->renderHints() & QPainter::SmoothPixmapTransform)
+ textureMapper->setImageInterpolationQuality(WebCore::InterpolationMedium);
+ else
+ textureMapper->setImageInterpolationQuality(WebCore::InterpolationNone);
+
textureMapper->setTextDrawingMode(context->textDrawingMode());
QPainter* painter = context->platformContext();
const QTransform transform = painter->worldTransform();
diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog
index 62f60c5..ec00b6e 100644
--- a/Source/WebKit/qt/ChangeLog
+++ b/Source/WebKit/qt/ChangeLog
@@ -1,5 +1,18 @@
2013-09-03 Allan Sandfeld Jensen <allan.jensen@digia.com>
+ [Qt] Images scaled poorly on composited canvas
+ https://bugs.webkit.org/show_bug.cgi?id=120632
+
+ Reviewed by Jocelyn Turcotte.
+
+ Explicitly set a imageInterpolationQuality on the TextureMapper, because
+ InterpolationDefault may be interpreted differently by nested GraphicsContexts.
+
+ * WebCoreSupport/TextureMapperLayerClientQt.cpp:
+ (TextureMapperLayerClientQt::renderCompositedLayers):
+
+2013-09-03 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
[Qt] Tiled-backing store not clipped to frame or visible rect
https://bugs.webkit.org/show_bug.cgi?id=120606
--
1.8.3.1