aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgdefaultrendercontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultrendercontext.cpp')
-rw-r--r--src/quick/scenegraph/qsgdefaultrendercontext.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/quick/scenegraph/qsgdefaultrendercontext.cpp b/src/quick/scenegraph/qsgdefaultrendercontext.cpp
index 1c7f6c5c59..6dbc20d9cb 100644
--- a/src/quick/scenegraph/qsgdefaultrendercontext.cpp
+++ b/src/quick/scenegraph/qsgdefaultrendercontext.cpp
@@ -50,6 +50,7 @@
#include <QtQuick/private/qsgcompressedtexture_p.h>
#include <QtQuick/qsgrendererinterface.h>
+#include <QtQuick/qquickgraphicsconfiguration.h>
QT_BEGIN_NAMESPACE
@@ -62,6 +63,7 @@ QSGDefaultRenderContext::QSGDefaultRenderContext(QSGContext *context)
, m_currentFrameCommandBuffer(nullptr)
, m_currentFrameRenderPass(nullptr)
, m_separateIndexBuffer(false)
+ , m_useDepthBufferFor2D(true)
{
}
@@ -150,9 +152,12 @@ void QSGDefaultRenderContext::invalidate()
emit invalidated();
}
-void QSGDefaultRenderContext::prepareSync(qreal devicePixelRatio, QRhiCommandBuffer *cb)
+void QSGDefaultRenderContext::prepareSync(qreal devicePixelRatio,
+ QRhiCommandBuffer *cb,
+ const QQuickGraphicsConfiguration &config)
{
m_currentDevicePixelRatio = devicePixelRatio;
+ m_useDepthBufferFor2D = config.isDepthBufferEnabledFor2D();
// we store the command buffer already here, in case there is something in
// an updatePaintNode() implementation that leads to needing it (for
@@ -277,11 +282,6 @@ void QSGDefaultRenderContext::initializeRhiShader(QSGMaterialShader *shader, QSh
QSGMaterialShaderPrivate::get(shader)->prepare(shaderVariant);
}
-bool QSGDefaultRenderContext::separateIndexBuffer() const
-{
- return m_separateIndexBuffer;
-}
-
void QSGDefaultRenderContext::preprocess()
{
for (auto it = m_glyphCaches.begin(); it != m_glyphCaches.end(); ++it) {