summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/platformcompositor
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/platformcompositor')
-rw-r--r--src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp9
-rw-r--r--src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h2
2 files changed, 5 insertions, 6 deletions
diff --git a/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp b/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp
index dbaaf524e8..e938020437 100644
--- a/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp
+++ b/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
@@ -101,7 +101,7 @@ QOpenGLCompositorBackingStore::~QOpenGLCompositorBackingStore()
ctx->makeCurrent(tempSurface.data());
}
- if (ctx && m_bsTextureContext && ctx->shareGroup() == m_bsTextureContext->shareGroup())
+ if (m_bsTextureContext && ctx->shareGroup() == m_bsTextureContext->shareGroup())
glDeleteTextures(1, &m_bsTexture);
else
qWarning("QOpenGLCompositorBackingStore: Texture is not valid in the current context");
@@ -202,14 +202,13 @@ void QOpenGLCompositorBackingStore::flush(QWindow *window, const QRegion &region
}
void QOpenGLCompositorBackingStore::composeAndFlush(QWindow *window, const QRegion &region, const QPoint &offset,
- QPlatformTextureList *textures, QOpenGLContext *context,
+ QPlatformTextureList *textures,
bool translucentBackground)
{
// QOpenGLWidget/QQuickWidget content provided as textures. The raster content goes on top.
Q_UNUSED(region);
Q_UNUSED(offset);
- Q_UNUSED(context);
Q_UNUSED(translucentBackground);
QOpenGLCompositor *compositor = QOpenGLCompositor::instance();
@@ -218,7 +217,7 @@ void QOpenGLCompositorBackingStore::composeAndFlush(QWindow *window, const QRegi
// The compositor's context and the context to which QOpenGLWidget/QQuickWidget
// textures belong are not the same. They share resources, though.
- Q_ASSERT(context->shareGroup() == dstCtx->shareGroup());
+ Q_ASSERT(qt_window_private(window)->shareContext()->shareGroup() == dstCtx->shareGroup());
QWindow *dstWin = compositor->targetWindow();
if (!dstWin)
diff --git a/src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h b/src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h
index 0b025e4304..da68b90e92 100644
--- a/src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h
+++ b/src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h
@@ -75,7 +75,7 @@ public:
QImage toImage() const Q_DECL_OVERRIDE;
void composeAndFlush(QWindow *window, const QRegion &region, const QPoint &offset,
- QPlatformTextureList *textures, QOpenGLContext *context,
+ QPlatformTextureList *textures,
bool translucentBackground) Q_DECL_OVERRIDE;
const QPlatformTextureList *textures() const { return m_textures; }