summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/mirclient/qmirclientglcontext.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/mirclient/qmirclientglcontext.h')
-rw-r--r--src/plugins/platforms/mirclient/qmirclientglcontext.h28
1 files changed, 11 insertions, 17 deletions
diff --git a/src/plugins/platforms/mirclient/qmirclientglcontext.h b/src/plugins/platforms/mirclient/qmirclientglcontext.h
index eac0b78c4e..92331a6fb1 100644
--- a/src/plugins/platforms/mirclient/qmirclientglcontext.h
+++ b/src/plugins/platforms/mirclient/qmirclientglcontext.h
@@ -42,28 +42,22 @@
#define QMIRCLIENTGLCONTEXT_H
#include <qpa/qplatformopenglcontext.h>
-#include "qmirclientscreen.h"
+#include <QtEglSupport/private/qeglplatformcontext_p.h>
-class QMirClientOpenGLContext : public QPlatformOpenGLContext
+#include <EGL/egl.h>
+
+class QMirClientOpenGLContext : public QEGLPlatformContext
{
public:
- QMirClientOpenGLContext(QMirClientScreen* screen, QMirClientOpenGLContext* share);
- virtual ~QMirClientOpenGLContext();
-
- // QPlatformOpenGLContext methods.
- QSurfaceFormat format() const override { return mScreen->surfaceFormat(); }
- void swapBuffers(QPlatformSurface* surface) override;
- bool makeCurrent(QPlatformSurface* surface) override;
- void doneCurrent() override;
- bool isValid() const override { return mEglContext != EGL_NO_CONTEXT; }
- QFunctionPointer getProcAddress(const char *procName) override;
+ QMirClientOpenGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share,
+ EGLDisplay display);
- EGLContext eglContext() const { return mEglContext; }
+ // QEGLPlatformContext methods.
+ void swapBuffers(QPlatformSurface *surface) final;
+ bool makeCurrent(QPlatformSurface *surface) final;
-private:
- QMirClientScreen* mScreen;
- EGLContext mEglContext;
- EGLDisplay mEglDisplay;
+protected:
+ EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) final;
};
#endif // QMIRCLIENTGLCONTEXT_H