diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2016-01-13 07:19:44 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-01-13 07:19:44 +0000 |
commit | 9a969182cfa452fdb305bc9fe0becc6b358f91c1 (patch) | |
tree | 9850ac418b869e42e17d82cc14d2fe0aa93a3192 /src/plugins/platforms/xcb/qxcbbackingstore.cpp | |
parent | f7020a31c02f4d1e5a46ce2ea20e38751f9afeed (diff) | |
parent | 6b8c0a50585bb637c5cd33ca8ffde0cb9c4e3664 (diff) |
Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbbackingstore.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbbackingstore.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp index 1825a463d0..006df320fe 100644 --- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp +++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp @@ -51,6 +51,7 @@ #include <qscreen.h> #include <QtGui/private/qhighdpiscaling_p.h> #include <qpa/qplatformgraphicsbuffer.h> +#include <private/qimage_p.h> #include <algorithm> QT_BEGIN_NAMESPACE @@ -172,6 +173,9 @@ QXcbShmImage::QXcbShmImage(QXcbScreen *screen, const QSize &size, uint depth, QI qWarning() << "QXcbBackingStore: Error while marking the shared memory segment to be destroyed"; } + if (QImage::toPixelFormat(format).alphaUsage() == QPixelFormat::IgnoresAlpha) + format = qt_alphaVersionForPainting(format); + m_qimage = QImage( (uchar*) m_xcb_image->data, m_xcb_image->width, m_xcb_image->height, m_xcb_image->stride, format); m_graphics_buffer = new QXcbShmGraphicsBuffer(&m_qimage); } |