From 5456fd6cd062679e78fe1c04021a5a4fa46ebcdd Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 5 Aug 2011 10:35:10 +0200 Subject: [PATCH] Remove the QGLContext from QSGCanvas MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I6ad95d05d9874704b038943f7887611315733c89 Reviewed-on: http://codereview.qt.nokia.com/2678 Reviewed-by: Qt Sanity Bot Reviewed-by: Samuel Rødal --- src/declarative/items/qsgcanvas.cpp | 12 ++++-------- src/declarative/items/qsgcanvas_p.h | 2 -- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp index 4257650..94d220b 100644 --- a/src/declarative/items/qsgcanvas.cpp +++ b/src/declarative/items/qsgcanvas.cpp @@ -1884,16 +1884,12 @@ void QSGCanvasRenderThread::run() if (!guiContext) { guiContext = new QGuiGLContext(); guiContext->create(); + guiContext->makeCurrent(renderer); - glContext = QGLContext::fromGuiGLContext(guiContext); - - } - - guiContext->makeCurrent(renderer); - - if (!d->context->isReady()) d->initializeSceneGraph(); - + } else { + guiContext->makeCurrent(renderer); + } while (!shouldExit) { lock(); diff --git a/src/declarative/items/qsgcanvas_p.h b/src/declarative/items/qsgcanvas_p.h index bb2c0f8..e16d916 100644 --- a/src/declarative/items/qsgcanvas_p.h +++ b/src/declarative/items/qsgcanvas_p.h @@ -186,7 +186,6 @@ public: QSGCanvasRenderThread() : mutex(QMutex::NonRecursive) , guiContext(0) - , glContext(0) , isGuiBlocked(0) , isPaintCompleted(false) , isGuiBlockPending(false) @@ -231,7 +230,6 @@ public: QSGCanvasPrivate *d; QGuiGLContext *guiContext; - QGLContext *glContext; int isGuiBlocked; uint isPaintCompleted : 1; -- 2.7.4