| 1 |
// Copyright (C) 2016 The Qt Company Ltd. |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 4 |
|
| 5 |
#ifndef QXCBBACKINGSTORE_H |
| 6 |
#define QXCBBACKINGSTORE_H |
| 7 |
|
| 8 |
#include <qpa/qplatformbackingstore.h> |
| 9 |
|
| 10 |
#include <xcb/xcb.h> |
| 11 |
|
| 12 |
#include "qxcbobject.h" |
| 13 |
|
| 14 |
QT_BEGIN_NAMESPACE |
| 15 |
|
| 16 |
class QXcbShmImage; |
| 17 |
|
| 18 |
class QXcbBackingStore : public QXcbObject, public QPlatformBackingStore |
| 19 |
{ |
| 20 |
public: |
| 21 |
QXcbBackingStore(QWindow *widget); |
| 22 |
~QXcbBackingStore(); |
| 23 |
|
| 24 |
QPaintDevice *paintDevice() Q_DECL_OVERRIDE; |
| 25 |
void flush(QWindow *window, const QRegion ®ion, const QPoint &offset) Q_DECL_OVERRIDE; |
| 26 |
#ifndef QT_NO_OPENGL |
| 27 |
void composeAndFlush(QWindow *window, const QRegion ®ion, const QPoint &offset, |
| 28 |
QPlatformTextureList *textures, QOpenGLContext *context, |
| 29 |
bool translucentBackground) Q_DECL_OVERRIDE; |
| 30 |
QImage toImage() const Q_DECL_OVERRIDE; |
| 31 |
#endif |
| 32 |
|
| 33 |
QPlatformGraphicsBuffer *graphicsBuffer() const Q_DECL_OVERRIDE; |
| 34 |
|
| 35 |
void resize(const QSize &size, const QRegion &staticContents) Q_DECL_OVERRIDE; |
| 36 |
bool scroll(const QRegion &area, int dx, int dy) Q_DECL_OVERRIDE; |
| 37 |
|
| 38 |
void beginPaint(const QRegion &) Q_DECL_OVERRIDE; |
| 39 |
void endPaint() Q_DECL_OVERRIDE; |
| 40 |
|
| 41 |
QXcbShmImage *m_image; |
| 42 |
private: |
| 43 |
QRegion m_paintRegion; |
| 44 |
QImage m_rgbImage; |
| 45 |
}; |
| 46 |
|
| 47 |
QT_END_NAMESPACE |
| 48 |
|
| 49 |
#endif |