summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.h')
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.h39
1 files changed, 24 insertions, 15 deletions
diff --git a/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.h b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.h
index 07e0f620de..27a7287b07 100644
--- a/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.h
+++ b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.h
@@ -43,6 +43,7 @@
#define QWAYLANDREADBACKGLXCONTEXT_H
#include <QPlatformGLContext>
+#include <QGuiGLFormat>
#include "qwaylandreadbackglxintegration.h"
@@ -51,29 +52,37 @@
class QWaylandReadbackGlxWindow;
class QWaylandShmBuffer;
+class QWaylandReadbackGlxSurface : public QPlatformGLSurface
+{
+public:
+ QWaylandReadbackGlxSurface(QWaylandReadbackGlxWindow *window);
+
+ QWaylandReadbackGlxWindow *window() const { return m_window; }
+ GLXPixmap glxPixmap() const;
+
+private:
+ QWaylandReadbackGlxWindow *m_window;
+};
+
class QWaylandReadbackGlxContext : public QPlatformGLContext
{
public:
- QWaylandReadbackGlxContext(QWaylandReadbackGlxIntegration *glxIntegration, QWaylandReadbackGlxWindow *window);
+ QWaylandReadbackGlxContext(const QGuiGLFormat &format, QPlatformGLContext *share, Display *display, int screen);
- void makeCurrent();
- void doneCurrent();
- void swapBuffers();
- void* getProcAddress(const QString& procName);
+ QGuiGLFormat format() const;
- QPlatformWindowFormat platformWindowFormat() const;
+ void swapBuffers(const QPlatformGLSurface &surface);
- void geometryChanged();
+ bool makeCurrent(const QPlatformGLSurface &surface);
+ void doneCurrent();
+
+ void (*getProcAddress(const QByteArray &procName)) ();
private:
- QWaylandReadbackGlxIntegration *mGlxIntegration;
- QWaylandReadbackGlxWindow *mWindow;
- QWaylandShmBuffer *mBuffer;
-
- Pixmap mPixmap;
- GLXFBConfig mConfig;
- GLXContext mContext;
- GLXPixmap mGlxPixmap;
+ GLXContext m_context;
+
+ Display *m_display;
+ QGuiGLFormat m_format;
};
#endif // QWAYLANDREADBACKGLXCONTEXT_H