diff options
author | Gerry Boland <gerry.boland@canonical.com> | 2016-11-02 16:46:53 +0000 |
---|---|---|
committer | Matti Paaso <matti.paaso@qt.io> | 2017-01-24 05:52:52 +0000 |
commit | c28fde3fdac19fd5a5f614bb7983080031c924b3 (patch) | |
tree | 441d2d4ea4e1e17db49ed3b12c7c724cbc6db894 /src/plugins/platforms/mirclient/qmirclientglcontext.h | |
parent | 4b507e8257243e36f40089d57099c2d668c5884d (diff) |
Mirclient: update based on upstream development in lp:qtubuntu
This is based on revision 360 of lp:qtubuntu.
Main features/bugs fixed:
- fix QQuickWidget-based app rendering
- wire up Qt window types to Mir to enable desktop-based applications
to function with a window manager
- use QEGLPlatformContext and QEGLPBuffer instead of custom code
- correctly populate and update list of QScreens
- support for switching keyboard layouts
- improve window resizing to fix visual glitching
Change-Id: If816a858eb10b6356275d4b80c89a72562b3c29f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Matti Paaso <matti.paaso@qt.io>
Diffstat (limited to 'src/plugins/platforms/mirclient/qmirclientglcontext.h')
-rw-r--r-- | src/plugins/platforms/mirclient/qmirclientglcontext.h | 28 |
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 |