diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-05-22 08:54:14 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-22 07:59:49 +0200 |
commit | eea02ff10da0ff6bba665df560c5404477b9f550 (patch) | |
tree | 4222b91ae33f9ce1337ec276951d468d9cecf563 /src/plugins/platforms/winrt/qwinrtbackingstore.h | |
parent | c32295eb8008c01b422fc04839b22e914786704f (diff) |
WinRT: Support High-DPI
Previously, the backing store and default framebuffer were created with
the logical screen resolution (in device-independent pixels), not the
the physical screen resolution. This lead to blurry text on high-DPI
devices. This change fixes this by creating those at full size, and
setting the device pixel ratio appropriately. Windows are still reported
in device-independent pixels, but text and images are now rendered
sharply for Qt Quick applications.
As QPainter does not support non-integer scaling, the backing store is
still drawn in DIPs and scaled by OpenGL.
Task-number: QTBUG-38464
Change-Id: I7377d4c734126825d670b8ebb65fd0dd1ef705f2
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtbackingstore.h')
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtbackingstore.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtbackingstore.h b/src/plugins/platforms/winrt/qwinrtbackingstore.h index 726f7c838f..f00fa85a26 100644 --- a/src/plugins/platforms/winrt/qwinrtbackingstore.h +++ b/src/plugins/platforms/winrt/qwinrtbackingstore.h @@ -60,18 +60,19 @@ public: void endPaint(); void flush(QWindow *window, const QRegion ®ion, const QPoint &offset); void resize(const QSize &size, const QRegion &staticContents); + QImage toImage() const Q_DECL_OVERRIDE { return m_paintDevice; } private: bool initialize(); bool m_initialized; QSize m_size; - QScopedPointer<QPaintDevice> m_paintDevice; QScopedPointer<QOpenGLContext> m_context; quint32 m_shaderProgram; quint32 m_fbo; quint32 m_rbo; quint32 m_texture; QWinRTScreen *m_screen; + QImage m_paintDevice; }; QT_END_NAMESPACE |