#include "qquickthreadedwindowmanager_p.h"
#include <QtCore/QTime>
+#include <QtCore/QDebug>
#include <QtGui/QOpenGLContext>
#include <QtGui/private/qguiapplication_p.h>
WindowData *windowData = it.value();
QQuickWindowPrivate *windowPrivate = QQuickWindowPrivate::get(window);
- Q_ASSERT(windowPrivate->isRenderable());
-
- gl->makeCurrent(window);
+ if (windowPrivate->isRenderable()) {
+ gl->makeCurrent(window);
- if (windowData->viewportSize != windowData->windowSize) {
+ if (windowData->viewportSize != windowData->windowSize) {
#ifdef THREAD_DEBUG
- printf(" RenderThread: --- window has changed size...\n");
+ printf(" RenderThread: --- window has changed size...\n");
#endif
- windowData->viewportSize = windowData->windowSize;
- windowData->sizeWasChanged = true;
- glViewport(0, 0, windowData->viewportSize.width(), windowData->viewportSize.height());
- }
+ windowData->viewportSize = windowData->windowSize;
+ windowData->sizeWasChanged = true;
+ glViewport(0, 0, windowData->viewportSize.width(), windowData->viewportSize.height());
+ }
- windowPrivate->syncSceneGraph();
+ windowPrivate->syncSceneGraph();
+ } else {
+ qWarning().nospace()
+ << "Non-renderable window " << window
+ << " (" << window->geometry() << ").";
+ }
}
inSync = false;
if (!masterWindow)
return;
- Q_ASSERT(QQuickWindowPrivate::get(masterWindow)->isRenderable());
+ if (!QQuickWindowPrivate::get(masterWindow)->isRenderable()) {
+ qWarning().nospace()
+ << "Unable to find a renderable master window "
+ << masterWindow << "when trying to render"
+ << window << " (" << window->geometry() << ").";
+ return;
+ }
if (!gl) {
gl = new QOpenGLContext();