8#include <private/qhighdpiscaling_p.h>
12# include <X11/extensions/Xrender.h>
23 , m_translucentBackground(
false)
26 m_translucentBackground =
w->connection()->hasXRender() &&
55 if (!platformWindow) {
56 qWarning(
"QXcbBackingStore::flush: QWindow has no platform window (QTBUG-32681)");
66 if (m_translucentBackground)
68 XWindowAttributes attrib;
69 XGetWindowAttributes(
display(), wid, &attrib);
70 XRenderPictFormat *
format = XRenderFindVisualFormat(
display(), attrib.visual);
75 XRenderSetPictureClipRectangles(
display(), dstPic, 0, 0, clipRects.
constData(), clipRects.
size());
77 XRenderComposite(
display(), PictOpSrc, srcPic, 0L , dstPic, br.
x() +
offset.x(),
80 XRenderFreePicture(
display(), dstPic);
85 GC gc = XCreateGC(
display(), wid, 0,
nullptr);
87 if (clipRects.
size() != 1)
88 XSetClipRectangles(
display(), gc, 0, 0, clipRects.
data(), clipRects.
size(), YXBanded);
114#if QT_CONFIG(xrender)
115 if (m_translucentBackground && newPixmap.
depth() != 32)
125 GC gc = XCreateGC(
display(), to, 0,
nullptr);
131 m_pixmap = newPixmap;
156#if QT_CONFIG(xrender)
157 if (m_translucentBackground) {
159 const XRenderColor
color = { 0, 0, 0, 0 };
160 XRenderFillRectangles(
display(), PictOpSrc,
169Display *QXcbNativeBackingStore::display()
const
static QPixelFormat toPixelFormat(QImage::Format format) noexcept
Converts format into a QPixelFormat.
qsizetype size() const noexcept
const_pointer constData() const noexcept
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
QImage toImage() const
Converts the pixmap to a QImage.
QSize size() const
Returns the size of the pixmap.
int depth() const
Returns the depth of the pixmap.
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
constexpr int height() const noexcept
Returns the height of the rectangle.
constexpr bool isNull() const noexcept
Returns true if the rectangle is a null rectangle, otherwise returns false.
QRect intersected(const QRect &other) const noexcept
constexpr int x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr int width() const noexcept
Returns the width of the rectangle.
constexpr QRect translated(int dx, int dy) const noexcept
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis,...
constexpr int y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
The QRegion class specifies a clip region for a painter.
QRect boundingRect() const noexcept
Returns the bounding rectangle of this region.
constexpr int height() const noexcept
Returns the height.
constexpr int width() const noexcept
Returns the width.
QSize size() const override
Returns the size of the window excluding any window frame.
void beginPaint(const QRegion ®ion) override
This function is called before painting onto the surface begins, with the region in which the paintin...
QXcbNativeBackingStore(QWindow *window)
void flush(QWindow *window, const QRegion ®ion, const QPoint &offset) override
Flushes the given region from the specified window.
QImage toImage() const override
Implemented in subclasses to return the content of the backingstore as a QImage.
~QXcbNativeBackingStore()
QPaintDevice * paintDevice() override
Implement this function to return the appropriate paint device.
void resize(const QSize &size, const QRegion &staticContents) override
bool scroll(const QRegion &area, int dx, int dy) override
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative.
xcb_window_t xcb_window() const
void updateSyncRequestCounter()
[Window class with invokable method]
struct wl_display * display
T toNativePixels(const T &value, const C *context)
Combined button and popup list for selecting options.
DBusConnection * connection
static int area(const QSize &s)
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLintptr offset
GLint GLsizei GLsizei GLenum format
Pixmap qt_x11PixmapHandle(const QPixmap &pixmap)
Picture qt_x11PictureHandle(const QPixmap &pixmap)
QX11PlatformPixmap * qt_x11Pixmap(const QPixmap &pixmap)
QList< XRectangle > qt_region_to_xrectangles(const QRegion &r)