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>
This commit is contained in:
Morten Johan Sørvig 2015-08-06 22:42:18 +02:00
parent ce651b961d
commit 8f747efcc1

View File

@ -182,7 +182,8 @@ void QBackingStore::beginPaint(const QRegion &region)
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()