summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbbackingstore.cpp
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@qt.io>2018-12-27 01:10:29 +0100
committerGatis Paeglis <gatis.paeglis@qt.io>2019-01-03 10:09:40 +0000
commit7d8fe4d98fc5e05f60a91649f208b92d622a4eac (patch)
tree48377a5bb6c3991b65ff9dd2127f71fd5ea308cb /src/plugins/platforms/xcb/qxcbbackingstore.cpp
parent6899117a59256082f37492d81ecaf56a0844690e (diff)
configure: make xcb-render a hard dependency for xcb plugin
Its been available by default since at least libxcb 1.5, and in Qt 5.12 we have even increased the minimal required libxcb version to 1.9. Having configure switches for extensions is a legacy from Qt 4. There are still few exceptions in Qt5, where the reason is that we have to support Linux distributions that don't ship recent enough libxcb. Task-number: QTBUG-30939 Change-Id: I0a02d93b6411119ec018b0cb8fe5c63beeab62ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbbackingstore.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index e446933dac..f9240a45cc 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -45,10 +45,8 @@
#include <xcb/shm.h>
#include <xcb/xcb_image.h>
-#if QT_CONFIG(xcb_render)
#include <xcb/render.h>
#include <xcb/xcb_renderutil.h>
-#endif
#include <sys/ipc.h>
#include <sys/shm.h>
@@ -956,16 +954,13 @@ QXcbSystemTrayBackingStore::QXcbSystemTrayBackingStore(QWindow *window)
if (depth != 32) {
platformWindow->setParentRelativeBackPixmap();
-#if QT_CONFIG(xcb_render)
initXRenderMode();
-#endif
m_useGrabbedBackgound = !m_usingXRenderMode;
}
}
QXcbSystemTrayBackingStore::~QXcbSystemTrayBackingStore()
{
-#if QT_CONFIG(xcb_render)
if (m_xrenderPicture) {
xcb_render_free_picture(xcb_connection(), m_xrenderPicture);
m_xrenderPicture = XCB_NONE;
@@ -978,7 +973,6 @@ QXcbSystemTrayBackingStore::~QXcbSystemTrayBackingStore()
xcb_render_free_picture(xcb_connection(), m_windowPicture);
m_windowPicture = XCB_NONE;
}
-#endif // QT_CONFIG(xcb_render)
}
void QXcbSystemTrayBackingStore::beginPaint(const QRegion &region)
@@ -1000,7 +994,6 @@ void QXcbSystemTrayBackingStore::render(xcb_window_t window, const QRegion &regi
return;
}
-#if QT_CONFIG(xcb_render)
m_image->put(m_xrenderPixmap, region, offset);
const QRect bounds = region.boundingRect();
const QPoint target = bounds.topLeft();
@@ -1011,7 +1004,6 @@ void QXcbSystemTrayBackingStore::render(xcb_window_t window, const QRegion &regi
m_xrenderPicture, 0, m_windowPicture,
target.x(), target.y(), 0, 0, target.x(), target.y(),
source.width(), source.height());
-#endif // QT_CONFIG(xcb_render)
}
void QXcbSystemTrayBackingStore::recreateImage(QXcbWindow *win, const QSize &size)
@@ -1028,7 +1020,6 @@ void QXcbSystemTrayBackingStore::recreateImage(QXcbWindow *win, const QSize &siz
return;
}
-#if QT_CONFIG(xcb_render)
if (m_xrenderPicture) {
xcb_render_free_picture(xcb_connection(), m_xrenderPicture);
m_xrenderPicture = XCB_NONE;
@@ -1051,10 +1042,8 @@ void QXcbSystemTrayBackingStore::recreateImage(QXcbWindow *win, const QSize &siz
m_image->resize(size);
else
m_image = new QXcbBackingStoreImage(this, size, 32, QImage::Format_ARGB32_Premultiplied);
-#endif // QT_CONFIG(xcb_render)
}
-#if QT_CONFIG(xcb_render)
void QXcbSystemTrayBackingStore::initXRenderMode()
{
if (!connection()->hasXRender())
@@ -1098,6 +1087,5 @@ void QXcbSystemTrayBackingStore::initXRenderMode()
m_usingXRenderMode = true;
}
-#endif // QT_CONFIG(xcb_render)
QT_END_NAMESPACE