From c28fde3fdac19fd5a5f614bb7983080031c924b3 Mon Sep 17 00:00:00 2001 From: Gerry Boland Date: Wed, 2 Nov 2016 16:46:53 +0000 Subject: 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 Reviewed-by: Matti Paaso --- .../platforms/mirclient/qmirclientglcontext.h | 28 +++++++++------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'src/plugins/platforms/mirclient/qmirclientglcontext.h') 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 -#include "qmirclientscreen.h" +#include -class QMirClientOpenGLContext : public QPlatformOpenGLContext +#include + +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 -- cgit v1.2.3