summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowswindow.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-05-23 15:07:06 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-31 09:13:01 +0200
commite7f1106edb1ac37d92d7851c44cd8d99f68eaaf4 (patch)
treeb4d01b3ca52a0ff8a8ec0aa1803beeac78196508 /src/plugins/platforms/windows/qwindowswindow.h
parentb63e101a90b677dcb192214aef35a107620c5f3c (diff)
Windows: Add ANGLE support.
- Add QWindowsEGLContext usable for ANGLE and Windows CE. - Add QWindowsEGLStaticContext containing the display for resource cleanup. - Add EGLSurface to QWindowsWindow. - Add a -angle option specifying the path to the external ANGLE installation to configure, add libraries to the mkspecs. Initial-patch-by: Jabot Corentin <corentinjabot@gmail.com> Task-number: QTBUG-24207 Change-Id: I5f80b1efb6996da7c5d70aa3720f7801c9e4c6af Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowswindow.h')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index b558252968..045da7d355 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -50,11 +50,20 @@
#include <qpa/qplatformwindow.h>
+#ifdef QT_OPENGL_ES_2
+# include <QtCore/QSharedPointer>
+# include <EGL/egl.h>
+#endif
+
QT_BEGIN_NAMESPACE
class QWindowsOleDropTarget;
class QDebug;
+#ifdef QT_OPENGL_ES_2
+class QWindowsEGLStaticContext;
+#endif
+
struct QWindowsGeometryHint
{
QWindowsGeometryHint() {}
@@ -101,6 +110,10 @@ struct QWindowCreationContext
class QWindowsWindow : public QPlatformWindow
{
public:
+#ifdef QT_OPENGL_ES_2
+ typedef QSharedPointer<QWindowsEGLStaticContext> QWindowsEGLStaticContextPtr;
+#endif
+
enum Flags
{
WithinWmPaint = 0x1,
@@ -160,6 +173,11 @@ public:
Qt::WindowState windowState_sys() const;
Qt::WindowStates windowStates_sys() const;
+#ifdef QT_OPENGL_ES_2
+ EGLSurface eglSurfaceHandle() const { return m_eglSurface;}
+ EGLSurface ensureEglSurfaceHandle(const QWindowsEGLStaticContextPtr &staticContext, EGLConfig config);
+#endif
+
inline unsigned style() const
{ return GetWindowLongPtr(m_data.hwnd, GWL_STYLE); }
void setStyle(unsigned s) const;
@@ -236,6 +254,10 @@ private:
QWindowsOleDropTarget *m_dropTarget;
unsigned m_savedStyle;
QRect m_savedFrameGeometry;
+#ifdef QT_OPENGL_ES_2
+ EGLSurface m_eglSurface;
+ QSharedPointer<QWindowsEGLStaticContext> m_staticEglContext;
+#endif
};
// Conveniences for window frames.