diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-04-16 10:51:31 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-17 13:39:06 +0200 |
commit | 909d3a57dfc279d8a8dee0751bf7635551d6ee3b (patch) | |
tree | 5f7ce5d5b1b9d006c95201a7604dfa2d6562ef4d /src/quick/scenegraph | |
parent | 2170a46ceef158eab6ccb7ecbeb26ae3053e6544 (diff) |
Remove dead code.
The renderWithoutShowing was a piece of functionality that we
experimented on long ago and it never quite worked and has
it currently only adds bloat.
It would be sensible to be able to render a window without showing
it on screen, such as for testing purposes, but then it should
be done through proper public API and thouroughly supported
cross platform.
Change-Id: I6bea7335f769c038a8167bad77c2dba171359be9
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/qsgrenderloop.cpp | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index 33a99d1506..04981b54e7 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -215,49 +215,25 @@ void QSGGuiThreadRenderLoop::windowDestroyed(QQuickWindow *window) void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window) { - bool renderWithoutShowing = QQuickWindowPrivate::get(window)->renderWithoutShowing; - if ((!window->isExposed() && !renderWithoutShowing) || !m_windows.contains(window)) + if (!QQuickWindowPrivate::get(window)->isRenderable() || !m_windows.contains(window)) return; WindowData &data = const_cast<WindowData &>(m_windows[window]); - QQuickWindow *masterWindow = 0; - if (!window->isVisible() && !renderWithoutShowing) { - // Find a "proper surface" to bind... - for (QHash<QQuickWindow *, WindowData>::const_iterator it = m_windows.constBegin(); - it != m_windows.constEnd() && !masterWindow; ++it) { - if (it.key()->isVisible()) - masterWindow = it.key(); - } - } else { - masterWindow = window; - } - - if (!masterWindow) - return; - - if (!QQuickWindowPrivate::get(masterWindow)->isRenderable()) { - qWarning().nospace() - << "Unable to find a renderable master window " - << masterWindow << "when trying to render" - << window << " (" << window->geometry() << ")."; - return; - } - bool current = false; if (!gl) { gl = new QOpenGLContext(); - gl->setFormat(masterWindow->requestedFormat()); + gl->setFormat(window->requestedFormat()); if (!gl->create()) { delete gl; gl = 0; } - current = gl->makeCurrent(masterWindow); + current = gl->makeCurrent(window); if (current) sg->initialize(gl); } else { - current = gl->makeCurrent(masterWindow); + current = gl->makeCurrent(window); } bool alsoSwap = data.updatePending; |