Adapt setBackingStore() overrides in QWasmWindow and QEglFSWindow
This is a follow up to a4ca9e8065,
adapting the backing store setters to become proper overrides of
the newly implemented QPlatformWindow::setBackingStore();
Pick-to: 6.6
Change-Id: Id4f5ff8650ca4e4d3cab1d71d27041c6129bf4ea
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
bb10
parent
ecab68989e
commit
959a8b3967
|
|
@ -108,8 +108,12 @@ void QEglFSWindow::create()
|
|||
#endif
|
||||
}
|
||||
|
||||
void QEglFSWindow::setBackingStore(QOpenGLCompositorBackingStore *backingStore)
|
||||
void QEglFSWindow::setBackingStore(QPlatformBackingStore *store)
|
||||
{
|
||||
Q_ASSERT(store);
|
||||
Q_ASSERT_X(dynamic_cast<QOpenGLCompositorBackingStore *>(store), __FUNCTION__,
|
||||
"Argument is not a QOpenGLCompositorBackingStore.");
|
||||
auto *backingStore = static_cast<QOpenGLCompositorBackingStore *>(store);
|
||||
#ifndef QT_NO_OPENGL
|
||||
if (!m_rasterCompositingContext) {
|
||||
m_rasterCompositingContext = new QOpenGLContext;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public:
|
|||
|
||||
#ifndef QT_NO_OPENGL
|
||||
QOpenGLCompositorBackingStore *backingStore() { return m_backingStore; }
|
||||
void setBackingStore(QOpenGLCompositorBackingStore *backingStore);
|
||||
void setBackingStore(QPlatformBackingStore *backingStore) override;
|
||||
QWindow *sourceWindow() const override;
|
||||
const QPlatformTextureList *textures() const override;
|
||||
void endCompositing() override;
|
||||
|
|
|
|||
|
|
@ -236,6 +236,14 @@ QWasmScreen *QWasmWindow::platformScreen() const
|
|||
return static_cast<QWasmScreen *>(window()->screen()->handle());
|
||||
}
|
||||
|
||||
void QWasmWindow::setBackingStore(QPlatformBackingStore *store)
|
||||
{
|
||||
Q_ASSERT(store);
|
||||
Q_ASSERT_X(dynamic_cast<QWasmBackingStore *>(store), __FUNCTION__,
|
||||
"Argument is not a QWasmBackingStore.");
|
||||
m_backingStore = static_cast<QWasmBackingStore *>(store);
|
||||
}
|
||||
|
||||
void QWasmWindow::paint()
|
||||
{
|
||||
if (!m_backingStore || !isVisible() || m_context2d.isUndefined())
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ public:
|
|||
void setParent(const QPlatformWindow *window) final;
|
||||
|
||||
QWasmScreen *platformScreen() const;
|
||||
void setBackingStore(QWasmBackingStore *store) { m_backingStore = store; }
|
||||
void setBackingStore(QPlatformBackingStore *store) override;
|
||||
QWasmBackingStore *backingStore() const { return m_backingStore; }
|
||||
QWindow *window() const { return m_window; }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue