summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qopenglcompositor_p.h3
-rw-r--r--src/opengl/qopenglcompositorbackingstore.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/opengl/qopenglcompositor_p.h b/src/opengl/qopenglcompositor_p.h
index abe8d4959ef..66dd77c1c21 100644
--- a/src/opengl/qopenglcompositor_p.h
+++ b/src/opengl/qopenglcompositor_p.h
@@ -29,6 +29,7 @@ class QOpenGLFramebufferObject;
class QWindow;
class QPlatformTextureList;
+class QOpenGLCompositorBackingStore;
class QOpenGLCompositorWindow
{
public:
@@ -37,6 +38,8 @@ public:
virtual const QPlatformTextureList *textures() const = 0;
virtual void beginCompositing() { }
virtual void endCompositing() { }
+ virtual void setBackingStore(QOpenGLCompositorBackingStore *backingStore) = 0;
+ virtual QOpenGLCompositorBackingStore *backingStore() const = 0;
};
class Q_OPENGL_EXPORT QOpenGLCompositor : public QObject
diff --git a/src/opengl/qopenglcompositorbackingstore.cpp b/src/opengl/qopenglcompositorbackingstore.cpp
index a5cc391e48f..841087ed6ff 100644
--- a/src/opengl/qopenglcompositorbackingstore.cpp
+++ b/src/opengl/qopenglcompositorbackingstore.cpp
@@ -137,6 +137,9 @@ void QOpenGLCompositorBackingStore::updateTexture()
void QOpenGLCompositorBackingStore::flush(QWindow *window, const QRegion &region, const QPoint &offset)
{
// Called for ordinary raster windows.
+ auto *handle = dynamic_cast<QOpenGLCompositorWindow *>(window->handle());
+ if (handle && !handle->backingStore())
+ handle->setBackingStore(this);
Q_UNUSED(region);
Q_UNUSED(offset);