diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-01-06 14:51:37 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-17 14:30:48 +0100 |
commit | 328f2f9c35f3cc5e7049a060a608c3f72876484a (patch) | |
tree | 984f0f52446b95da5d7240122dcfbec02b0933b5 /src/plugins/platforms/eglfs/qeglfswindow.h | |
parent | 93154216ca7c7a46836716150fe70987d28d6f3c (diff) |
eglfs: Move reusable functionality to eglconvenience
The cursor implementation is generic GL(ES) code that should be shared
by all the present and future egl-based embedded platform
plugins. Follow the pattern of QEGLPlatformContext and move this class
into eglconvenience as QEGLPlatformCursor.
Similarly, the common bits from the context implementation context are
moved back to EGLPlatformContext.
eglconvenience has now base classes for integration, screen, window,
etc. too. By using these, eglfs becomes much smaller and cleaner. This
also paves the way for creating new, separate EGL-based platform
plugins for Android, embedded Linux, etc.
Also added some documentation to each of the base classes.
devicediscovery is now fixed to be usable on any platform. The
implementation in this case is naturally a dummy one. This finally
allows using it from anywhere without myriads of ugly ifdefs.
Change-Id: I02946e360c04e02de7fe234a23a08320eff4ccf5
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfswindow.h')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfswindow.h | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.h b/src/plugins/platforms/eglfs/qeglfswindow.h index ee3c194a7c..f93a9d54bc 100644 --- a/src/plugins/platforms/eglfs/qeglfswindow.h +++ b/src/plugins/platforms/eglfs/qeglfswindow.h @@ -45,42 +45,32 @@ #include "qeglfsintegration.h" #include "qeglfsscreen.h" -#include <qpa/qplatformwindow.h> +#include <QtPlatformSupport/private/qeglplatformwindow_p.h> QT_BEGIN_NAMESPACE -class QEglFSBackingStore; - -class QEglFSWindow : public QPlatformWindow +class QEglFSWindow : public QEGLPlatformWindow { public: QEglFSWindow(QWindow *w); ~QEglFSWindow(); - void setGeometry(const QRect &); - QRect geometry() const; - WId winId() const; - void setVisible(bool visible); - void requestActivateWindow(); - void raise(); - void lower(); + void create() Q_DECL_OVERRIDE; + void destroy(); + + void setGeometry(const QRect &) Q_DECL_OVERRIDE; + QRect geometry() const Q_DECL_OVERRIDE; + void setVisible(bool visible) Q_DECL_OVERRIDE; + void requestActivateWindow() Q_DECL_OVERRIDE; + void raise() Q_DECL_OVERRIDE; + void lower() Q_DECL_OVERRIDE; + QSurfaceFormat format() const Q_DECL_OVERRIDE; + EGLNativeWindowType eglWindow() const Q_DECL_OVERRIDE; EGLSurface surface() const; - QSurfaceFormat format() const; - EGLNativeWindowType eglWindow() const; - QEglFSScreen *screen() const; - void create(); - void destroy(); - bool hasNativeWindow() const { return m_flags.testFlag(HasNativeWindow); } - bool isRaster() const { return m_flags.testFlag(IsRaster); } - - QEglFSBackingStore *backingStore() { return m_backingStore; } - void setBackingStore(QEglFSBackingStore *backingStore) { m_backingStore = backingStore; } - - uint texture() const; virtual void invalidateSurface(); virtual void resetSurface(); @@ -92,13 +82,10 @@ protected: private: EGLConfig m_config; QSurfaceFormat m_format; - WId m_wid; - QEglFSBackingStore *m_backingStore; enum Flag { Created = 0x01, - IsRaster = 0x02, - HasNativeWindow = 0x04 + HasNativeWindow = 0x02 }; Q_DECLARE_FLAGS(Flags, Flag); Flags m_flags; |