aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/designer
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/designer')
-rw-r--r--src/quick/designer/qquickdesignerwindowmanager.cpp11
-rw-r--r--src/quick/designer/qquickdesignerwindowmanager_p.h5
2 files changed, 10 insertions, 6 deletions
diff --git a/src/quick/designer/qquickdesignerwindowmanager.cpp b/src/quick/designer/qquickdesignerwindowmanager.cpp
index 093559a572..9648a40a23 100644
--- a/src/quick/designer/qquickdesignerwindowmanager.cpp
+++ b/src/quick/designer/qquickdesignerwindowmanager.cpp
@@ -39,10 +39,10 @@
#include "qquickdesignerwindowmanager_p.h"
#include "private/qquickwindow_p.h"
+#include <QtQuick/QQuickWindow>
#if QT_CONFIG(opengl)
-# include <QtQuick/private/qsgdefaultrendercontext_p.h>
+#include <private/qsgdefaultrendercontext_p.h>
#endif
-#include <QtQuick/QQuickWindow>
QT_BEGIN_NAMESPACE
@@ -74,7 +74,12 @@ void QQuickDesignerWindowManager::makeOpenGLContext(QQuickWindow *window)
m_openGlContext->create();
if (!m_openGlContext->makeCurrent(window))
qWarning("QQuickWindow: makeCurrent() failed...");
- m_renderContext->initialize(m_openGlContext.data());
+ QSGDefaultRenderContext::InitParams params;
+ params.sampleCount = qMax(1, m_openGlContext->format().samples());
+ params.openGLContext = m_openGlContext.data();
+ params.initialSurfacePixelSize = window->size() * window->effectiveDevicePixelRatio();
+ params.maybeSurface = window;
+ m_renderContext->initialize(&params);
} else {
m_openGlContext->makeCurrent(window);
}
diff --git a/src/quick/designer/qquickdesignerwindowmanager_p.h b/src/quick/designer/qquickdesignerwindowmanager_p.h
index 5322b6c421..5e387ff5b9 100644
--- a/src/quick/designer/qquickdesignerwindowmanager_p.h
+++ b/src/quick/designer/qquickdesignerwindowmanager_p.h
@@ -55,18 +55,17 @@
#include <private/qsgrenderloop_p.h>
#include <private/qtquickglobal_p.h>
-#include <QtQuick/private/qsgcontext_p.h>
+#include <private/qsgcontext_p.h>
#if QT_CONFIG(opengl)
# include <QtGui/QOpenGLContext>
#endif
-
QT_BEGIN_NAMESPACE
class QQuickWindow;
class QSGContext;
-class QSGRenderContext;
+class QSGDefaultRenderContext;
class QAnimationDriver;
class QQuickDesignerWindowManager : public QSGRenderLoop