summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-02-06 12:10:18 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-06 13:34:31 +0100
commit5e64d7e2158a8ff1cb4a7e5dedb100f0cf123c5f (patch)
treebeb5079673fdf6bfedffe45fce92adfa6cc41326
parent247ab7f706ace2af766daa7051bf25bd3c399169 (diff)
TextureMapperGL must take hiDPI transform into account
Since TextureMapperGL does its own native rendering it must itself apply the all transforms QPainter would normally do behind the scenes. Task-number: QTBUG-36508 Change-Id: Id4a0ee64ff7ac5c5cb51e45ffd2e4e25ed7fce74 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-rw-r--r--Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp
index 4261a0be2..dff4e0eb1 100644
--- a/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp
@@ -114,7 +114,16 @@ void TextureMapperLayerClientQt::renderCompositedLayers(GraphicsContext* context
m_textureMapper->setTextDrawingMode(context->textDrawingMode());
QPainter* painter = context->platformContext();
- const QTransform transform = painter->worldTransform();
+ QTransform transform;
+ if (m_textureMapper->accelerationMode() == TextureMapper::OpenGLMode) {
+ // TextureMapperGL needs to duplicate the entire transform QPainter would do,
+ // including the transforms QPainter would normally do behind the scenes.
+ transform = painter->deviceTransform();
+ } else {
+ // TextureMapperImageBuffer needs a transform that can be used
+ // with QPainter::setWorldTransform.
+ transform = painter->worldTransform();
+ }
const TransformationMatrix matrix(
transform.m11(), transform.m12(), 0, transform.m13(),
transform.m21(), transform.m22(), 0, transform.m23(),