diff options
Diffstat (limited to 'src/opengl/qgl_p.h')
-rw-r--r-- | src/opengl/qgl_p.h | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 4c22f0f3d7..f2590e82b1 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -60,7 +60,7 @@ #include "QtCore/qthreadstorage.h" #include "QtCore/qhash.h" #include "QtCore/qatomic.h" -#include "private/qwidget_p.h" +#include "QtWidgets/private/qwidget_p.h" #include "qcache.h" #include "qglpaintdevice_p.h" @@ -69,7 +69,7 @@ #endif #if defined(Q_WS_QPA) -#include <QtGui/QPlatformGLContext> +#include <QtGui/QGuiGLContext> #endif QT_BEGIN_NAMESPACE @@ -96,10 +96,6 @@ QT_END_INCLUDE_NAMESPACE class QMacWindowChangeEvent; #endif -#ifdef Q_WS_QWS -class QWSGLWindowSurface; -#endif - #ifndef QT_NO_EGL class QEglContext; #endif @@ -212,8 +208,6 @@ public: #elif defined(Q_WS_MAC) QGLContext *olcx; void updatePaintDevice(); -#elif defined(Q_WS_QWS) - QWSGLWindowSurface *wsurf; #endif #ifdef Q_OS_SYMBIAN void recreateEglSurface(); @@ -375,7 +369,7 @@ public: #endif #if defined(Q_WS_QPA) - QPlatformGLContext *platformContext; + QGuiGLContext *guiGlContext; void setupSharing(); #elif defined(Q_WS_X11) || defined(Q_WS_MAC) @@ -388,11 +382,11 @@ public: void* pbuf; quint32 gpm; int screen; - QHash<QPixmapData*, QPixmap> boundPixmaps; + QHash<QPlatformPixmap*, QPixmap> boundPixmaps; QGLTexture *bindTextureFromNativePixmap(QPixmap*, const qint64 key, QGLContext::BindOptions options); - static void destroyGlSurfaceForPixmap(QPixmapData*); - static void unbindPixmapFromTexture(QPixmapData*); + static void destroyGlSurfaceForPixmap(QPlatformPixmap*); + static void unbindPixmapFromTexture(QPlatformPixmap*); #endif #if defined(Q_WS_MAC) bool update; @@ -508,18 +502,18 @@ class Q_OPENGL_EXPORT QGLTextureDestroyer : public QObject public: QGLTextureDestroyer() : QObject() { qRegisterMetaType<GLuint>("GLuint"); - connect(this, SIGNAL(freeTexture(QGLContext *, QPixmapData *, GLuint)), - this, SLOT(freeTexture_slot(QGLContext *, QPixmapData *, GLuint))); + connect(this, SIGNAL(freeTexture(QGLContext *, QPlatformPixmap *, GLuint)), + this, SLOT(freeTexture_slot(QGLContext *, QPlatformPixmap *, GLuint))); } - void emitFreeTexture(QGLContext *context, QPixmapData *boundPixmap, GLuint id) { + void emitFreeTexture(QGLContext *context, QPlatformPixmap *boundPixmap, GLuint id) { emit freeTexture(context, boundPixmap, id); } Q_SIGNALS: - void freeTexture(QGLContext *context, QPixmapData *boundPixmap, GLuint id); + void freeTexture(QGLContext *context, QPlatformPixmap *boundPixmap, GLuint id); private slots: - void freeTexture_slot(QGLContext *context, QPixmapData *boundPixmap, GLuint id) { + void freeTexture_slot(QGLContext *context, QPlatformPixmap *boundPixmap, GLuint id) { Q_UNUSED(boundPixmap); #if defined(Q_WS_X11) if (boundPixmap) { @@ -571,7 +565,7 @@ public: if (options & QGLContext::MemoryManagedBindOption) { Q_ASSERT(context); #if !defined(Q_WS_X11) - QPixmapData *boundPixmap = 0; + QPlatformPixmap *boundPixmap = 0; #endif context->d_ptr->texture_destroyer->emitFreeTexture(context, boundPixmap, id); } @@ -584,7 +578,7 @@ public: QGLContext::BindOptions options; #if defined(Q_WS_X11) - QPixmapData* boundPixmap; + QPlatformPixmap* boundPixmap; #endif bool canBindCompressedTexture @@ -629,8 +623,8 @@ public: void removeContextTextures(QGLContext *ctx); static QGLTextureCache *instance(); static void cleanupTexturesForCacheKey(qint64 cacheKey); - static void cleanupTexturesForPixampData(QPixmapData* pixmap); - static void cleanupBeforePixmapDestruction(QPixmapData* pixmap); + static void cleanupTexturesForPixampData(QPlatformPixmap* pixmap); + static void cleanupBeforePixmapDestruction(QPlatformPixmap* pixmap); private: QCache<QGLTextureCacheKey, QGLTexture> m_cache; |