diff options
| author | Mitch Curtis <mitch.curtis@qt.io> | 2025-04-23 04:32:09 +0000 |
|---|---|---|
| committer | Liang Qi <liang.qi@qt.io> | 2025-05-01 09:12:21 +0000 |
| commit | 11c171553eece9742ea94196b1cabc85d07d0ffb (patch) | |
| tree | 4aab93476a56bdc3c9910f6faa4b37758a0bd08e /src | |
| parent | 51c7503568174669b48a8f8ddbe49eebb127a128 (diff) | |
Revert "XCB: set devicePixelRatio on backing store QImages"
This reverts commit c70fd79a178a1e9a186cf8b2f78986e0a39845b4.
Reason for revert: causes a regression.
Pick-to: 6.9
Fixes: QTBUG-135867
Change-Id: Ia9a9049da778749d657ab999edd777650e572b86
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/platforms/xcb/qxcbbackingstore.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp index e8226284bc4..8353fac6a92 100644 --- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp +++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp @@ -226,7 +226,6 @@ void QXcbBackingStoreImage::resize(const QSize &size) m_xcb_image->data = m_shm_info.shmaddr ? m_shm_info.shmaddr : (uint8_t *)malloc(segmentSize); m_qimage = QImage(static_cast<uchar *>(m_xcb_image->data), m_xcb_image->width, m_xcb_image->height, m_xcb_image->stride, m_qimage_format); - m_qimage.setDevicePixelRatio(m_backingStore->window()->devicePixelRatio()); m_graphics_buffer = new QXcbGraphicsBuffer(&m_qimage); m_xcb_pixmap = xcb_generate_id(xcb_connection()); @@ -821,9 +820,7 @@ QImage QXcbBackingStore::toImage() const // Return an image that does not share QImageData with the original image, // even if they both point to the same data of the m_xcb_image, otherwise // painting to m_qimage would detach it from the m_xcb_image data. - QImage imageWrapper = QImage(image.constBits(), image.width(), image.height(), image.format()); - imageWrapper.setDevicePixelRatio(image.devicePixelRatio()); - return imageWrapper; + return QImage(image.constBits(), image.width(), image.height(), image.format()); } QPlatformGraphicsBuffer *QXcbBackingStore::graphicsBuffer() const |
