summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp3
-rw-r--r--src/opengl/qgl.cpp6
-rw-r--r--src/opengl/qglpixelbuffer.cpp7
3 files changed, 2 insertions, 14 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 1be243a3f9..49d6b297e4 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -2048,11 +2048,12 @@ bool QGL2PaintEngineEx::end()
{
Q_D(QGL2PaintEngineEx);
+ QGLContext *ctx = d->ctx;
glUseProgram(0);
d->transferMode(BrushDrawingMode);
d->device->endPaint();
- d->ctx->d_ptr->active_engine = 0;
+ ctx->d_ptr->active_engine = 0;
d->resetGLState();
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 25adf0bade..8ef1fc38e5 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -4394,9 +4394,6 @@ void QGLWidget::renderText(int x, int y, const QString &str, const QFont &font,
return;
}
- // this changes what paintEngine() returns
- qgl_engine_selector()->setPreferredPaintEngine(QPaintEngine::OpenGL);
- engine = paintEngine();
QPainter *p;
bool reuse_painter = false;
if (engine->isActive()) {
@@ -4495,9 +4492,6 @@ void QGLWidget::renderText(double x, double y, double z, const QString &str, con
return;
}
- // this changes what paintEngine() returns
- qgl_engine_selector()->setPreferredPaintEngine(QPaintEngine::OpenGL);
- engine = paintEngine();
QPainter *p;
bool reuse_painter = false;
bool use_depth_testing = glIsEnabled(GL_DEPTH_TEST);
diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp
index 8116b798ca..156c40f394 100644
--- a/src/opengl/qglpixelbuffer.cpp
+++ b/src/opengl/qglpixelbuffer.cpp
@@ -100,12 +100,6 @@
QT_BEGIN_NAMESPACE
-#if !defined(QT_OPENGL_ES_2)
-extern void qgl_cleanup_glyph_cache(QGLContext *);
-#else
-void qgl_cleanup_glyph_cache(QGLContext *) {}
-#endif
-
extern Q_OPENGL_EXPORT QImage qt_gl_read_framebuffer(const QSize&, bool, bool);
@@ -200,7 +194,6 @@ QGLPixelBuffer::~QGLPixelBuffer()
QGLContext *current = const_cast<QGLContext *>(QGLContext::currentContext());
if (current != d->qctx)
makeCurrent();
- qgl_cleanup_glyph_cache(d->qctx);
d->cleanup();
delete d->qctx;
if (current && current != d->qctx)