summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager.cpp18
-rw-r--r--src/opengl/gl2paintengineex/qglgradientcache.cpp8
-rw-r--r--src/opengl/gl2paintengineex/qglgradientcache_p.h6
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp2
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h10
-rw-r--r--src/opengl/gl2paintengineex/qtriangulator_p.h10
6 files changed, 27 insertions, 27 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
index 05a612c311..aebdce6e01 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
@@ -44,7 +44,7 @@
#include "qpaintengineex_opengl2_p.h"
#include "qglshadercache_p.h"
-#include <QtGui/private/qguiglcontext_qpa_p.h>
+#include <QtGui/private/qopenglcontext_p.h>
#if defined(QT_DEBUG)
#include <QMetaEnum>
@@ -54,12 +54,12 @@
QT_BEGIN_NAMESPACE
-class QGLEngineSharedShadersResource : public QGLSharedResource
+class QGLEngineSharedShadersResource : public QOpenGLSharedResource
{
public:
- QGLEngineSharedShadersResource(QGuiGLContext *ctx)
- : QGLSharedResource(ctx->shareGroup())
- , m_shaders(new QGLEngineSharedShaders(QGLContext::fromGuiGLContext(ctx)))
+ QGLEngineSharedShadersResource(QOpenGLContext *ctx)
+ : QOpenGLSharedResource(ctx->shareGroup())
+ , m_shaders(new QGLEngineSharedShaders(QGLContext::fromOpenGLContext(ctx)))
{
}
@@ -74,7 +74,7 @@ public:
m_shaders = 0;
}
- void freeResource(QGuiGLContext *)
+ void freeResource(QOpenGLContext *)
{
}
@@ -88,16 +88,16 @@ class QGLShaderStorage
{
public:
QGLEngineSharedShaders *shadersForThread(const QGLContext *context) {
- QGLMultiGroupSharedResource *&shaders = m_storage.localData();
+ QOpenGLMultiGroupSharedResource *&shaders = m_storage.localData();
if (!shaders)
- shaders = new QGLMultiGroupSharedResource;
+ shaders = new QOpenGLMultiGroupSharedResource;
QGLEngineSharedShadersResource *resource =
shaders->value<QGLEngineSharedShadersResource>(context->contextHandle());
return resource ? resource->shaders() : 0;
}
private:
- QThreadStorage<QGLMultiGroupSharedResource *> m_storage;
+ QThreadStorage<QOpenGLMultiGroupSharedResource *> m_storage;
};
Q_GLOBAL_STATIC(QGLShaderStorage, qt_shader_storage);
diff --git a/src/opengl/gl2paintengineex/qglgradientcache.cpp b/src/opengl/gl2paintengineex/qglgradientcache.cpp
index bd408ffdc4..6ca09ba140 100644
--- a/src/opengl/gl2paintengineex/qglgradientcache.cpp
+++ b/src/opengl/gl2paintengineex/qglgradientcache.cpp
@@ -55,14 +55,14 @@ public:
}
private:
- QGLMultiGroupSharedResource m_resource;
+ QOpenGLMultiGroupSharedResource m_resource;
QMutex m_mutex;
};
Q_GLOBAL_STATIC(QGL2GradientCacheWrapper, qt_gradient_caches)
-QGL2GradientCache::QGL2GradientCache(QGuiGLContext *ctx)
- : QGLSharedResource(ctx->shareGroup())
+QGL2GradientCache::QGL2GradientCache(QOpenGLContext *ctx)
+ : QOpenGLSharedResource(ctx->shareGroup())
{
}
@@ -82,7 +82,7 @@ void QGL2GradientCache::invalidateResource()
cache.clear();
}
-void QGL2GradientCache::freeResource(QGuiGLContext *)
+void QGL2GradientCache::freeResource(QOpenGLContext *)
{
cleanCache();
}
diff --git a/src/opengl/gl2paintengineex/qglgradientcache_p.h b/src/opengl/gl2paintengineex/qglgradientcache_p.h
index 1b001c3405..600085a75f 100644
--- a/src/opengl/gl2paintengineex/qglgradientcache_p.h
+++ b/src/opengl/gl2paintengineex/qglgradientcache_p.h
@@ -58,7 +58,7 @@
QT_BEGIN_NAMESPACE
-class QGL2GradientCache : public QGLSharedResource
+class QGL2GradientCache : public QOpenGLSharedResource
{
struct CacheInfo
{
@@ -76,14 +76,14 @@ class QGL2GradientCache : public QGLSharedResource
public:
static QGL2GradientCache *cacheForContext(const QGLContext *context);
- QGL2GradientCache(QGuiGLContext *);
+ QGL2GradientCache(QOpenGLContext *);
~QGL2GradientCache();
GLuint getBuffer(const QGradient &gradient, qreal opacity);
inline int paletteSize() const { return 1024; }
void invalidateResource();
- void freeResource(QGuiGLContext *ctx);
+ void freeResource(QOpenGLContext *ctx);
private:
inline int maxCacheSize() const { return 60; }
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 214bfa5b47..af6cb53a3a 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -59,7 +59,7 @@ QGLTextureGlyphCache::QGLTextureGlyphCache(QFontEngineGlyphCache::Type type, con
, m_serialNumber(qgltextureglyphcache_serial_number.fetchAndAddRelaxed(1))
{
#ifdef QT_GL_TEXTURE_GLYPH_CACHE_DEBUG
- qDebug(" -> QGLTextureGlyphCache() %p for context %p.", this, QGuiGLContext::currentContext());
+ qDebug(" -> QGLTextureGlyphCache() %p for context %p.", this, QOpenGLContext::currentContext());
#endif
m_vertexCoordinateArray[0] = -1.0f;
m_vertexCoordinateArray[1] = -1.0f;
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
index 2fcc551667..7b7da9d8e8 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
@@ -63,10 +63,10 @@ QT_BEGIN_NAMESPACE
class QGL2PaintEngineExPrivate;
-struct QGLGlyphTexture : public QGLSharedResource
+struct QGLGlyphTexture : public QOpenGLSharedResource
{
QGLGlyphTexture(const QGLContext *ctx)
- : QGLSharedResource(ctx->contextHandle()->shareGroup())
+ : QOpenGLSharedResource(ctx->contextHandle()->shareGroup())
, m_width(0)
, m_height(0)
{
@@ -78,9 +78,9 @@ struct QGLGlyphTexture : public QGLSharedResource
#endif
}
- void freeResource(QGuiGLContext *context)
+ void freeResource(QOpenGLContext *context)
{
- const QGLContext *ctx = QGLContext::fromGuiGLContext(context);
+ const QGLContext *ctx = QGLContext::fromOpenGLContext(context);
#ifdef QT_GL_TEXTURE_GLYPH_CACHE_DEBUG
qDebug("~QGLGlyphTexture() %p for context %p.", this, ctx);
#endif
@@ -136,7 +136,7 @@ public:
inline void setPaintEnginePrivate(QGL2PaintEngineExPrivate *p) { pex = p; }
- inline const QGuiGLContextGroup *contextGroup() const { return m_textureResource ? m_textureResource->group() : 0; }
+ inline const QOpenGLContextGroup *contextGroup() const { return m_textureResource ? m_textureResource->group() : 0; }
inline int serialNumber() const { return m_serialNumber; }
diff --git a/src/opengl/gl2paintengineex/qtriangulator_p.h b/src/opengl/gl2paintengineex/qtriangulator_p.h
index 04a219c255..a8e7553770 100644
--- a/src/opengl/gl2paintengineex/qtriangulator_p.h
+++ b/src/opengl/gl2paintengineex/qtriangulator_p.h
@@ -58,7 +58,7 @@
QT_BEGIN_NAMESPACE
-class Q_OPENGL_EXPORT QVertexIndexVector
+class QVertexIndexVector
{
public:
enum Type {
@@ -111,7 +111,7 @@ private:
QVector<quint16> indices16;
};
-struct Q_OPENGL_EXPORT QTriangleSet
+struct QTriangleSet
{
inline QTriangleSet() { }
inline QTriangleSet(const QTriangleSet &other) : vertices(other.vertices), indices(other.indices) { }
@@ -122,7 +122,7 @@ struct Q_OPENGL_EXPORT QTriangleSet
QVertexIndexVector indices; // [i[0], j[0], k[0], i[1], j[1], k[1], i[2], ...]
};
-struct Q_OPENGL_EXPORT QPolylineSet
+struct QPolylineSet
{
inline QPolylineSet() { }
inline QPolylineSet(const QPolylineSet &other) : vertices(other.vertices), indices(other.indices) { }
@@ -139,9 +139,9 @@ struct Q_OPENGL_EXPORT QPolylineSet
// 'lod' is the level of detail. Default is 1. Curves are split into more lines when 'lod' is higher.
QTriangleSet qTriangulate(const qreal *polygon, int count, uint hint = QVectorPath::PolygonHint | QVectorPath::OddEvenFill, const QTransform &matrix = QTransform());
QTriangleSet qTriangulate(const QVectorPath &path, const QTransform &matrix = QTransform(), qreal lod = 1);
-QTriangleSet Q_OPENGL_EXPORT qTriangulate(const QPainterPath &path, const QTransform &matrix = QTransform(), qreal lod = 1);
+QTriangleSet qTriangulate(const QPainterPath &path, const QTransform &matrix = QTransform(), qreal lod = 1);
QPolylineSet qPolyline(const QVectorPath &path, const QTransform &matrix = QTransform(), qreal lod = 1);
-QPolylineSet Q_OPENGL_EXPORT qPolyline(const QPainterPath &path, const QTransform &matrix = QTransform(), qreal lod = 1);
+QPolylineSet qPolyline(const QPainterPath &path, const QTransform &matrix = QTransform(), qreal lod = 1);
QT_END_NAMESPACE