diff options
author | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2015-08-06 22:42:18 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2015-08-13 18:28:28 +0000 |
commit | 8f747efcc14e2f3114821c2c2bfbc3991610890e (patch) | |
tree | 1e36e2bedf11a3fafa631fbc8789d66a7675e759 /src/gui/painting/qbackingstore.cpp | |
parent | ce651b961d6b53a34b11664317e8da8022d48cc2 (diff) |
Make QT_SCALE_FACTOR work on Wayland
Propagate the line stride when creating the high-dpi
backing store image.
Change-Id: I15f41965d8eaf1d01ddac0a1a012b71148f757e3
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Diffstat (limited to 'src/gui/painting/qbackingstore.cpp')
-rw-r--r-- | src/gui/painting/qbackingstore.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index 68ed3eae6e..8a5a6d4fcf 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -182,7 +182,8 @@ void QBackingStore::beginPaint(const QRegion ®ion) qCDebug(lcScaling) << "QBackingStore::beginPaint new backingstore for" << d_ptr->window; qCDebug(lcScaling) << " source size" << source->size() << "dpr" << source->devicePixelRatio(); d_ptr->highDpiBackingstore.reset( - new QImage(source->bits(), source->width(), source->height(), source->format())); + new QImage(source->bits(), source->width(), source->height(), source->bytesPerLine(), source->format())); + qreal targetDevicePixelRatio = d_ptr->window->devicePixelRatio(); d_ptr->highDpiBackingstore->setDevicePixelRatio(targetDevicePixelRatio); qCDebug(lcScaling) <<" destination size" << d_ptr->highDpiBackingstore->size() |