Adapt setBackingStore() overrides in QWasmWindow and QEglFSWindow
This is a follow up to a4ca9e80658bca7dad1529f03c1b59173a6ecf62, adapting the backing store setters to become proper overrides of the newly implemented QPlatformWindow::setBackingStore(); Change-Id: Id4f5ff8650ca4e4d3cab1d71d27041c6129bf4ea Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 959a8b3967ac3b6315f5b458628ec5661dfc367e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
ce7a1aa628
commit
1c0029070c
@ -108,8 +108,12 @@ void QEglFSWindow::create()
|
|||||||
#endif
|
#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
|
#ifndef QT_NO_OPENGL
|
||||||
if (!m_rasterCompositingContext) {
|
if (!m_rasterCompositingContext) {
|
||||||
m_rasterCompositingContext = new QOpenGLContext;
|
m_rasterCompositingContext = new QOpenGLContext;
|
||||||
|
@ -71,7 +71,7 @@ public:
|
|||||||
|
|
||||||
#ifndef QT_NO_OPENGL
|
#ifndef QT_NO_OPENGL
|
||||||
QOpenGLCompositorBackingStore *backingStore() { return m_backingStore; }
|
QOpenGLCompositorBackingStore *backingStore() { return m_backingStore; }
|
||||||
void setBackingStore(QOpenGLCompositorBackingStore *backingStore);
|
void setBackingStore(QPlatformBackingStore *backingStore) override;
|
||||||
QWindow *sourceWindow() const override;
|
QWindow *sourceWindow() const override;
|
||||||
const QPlatformTextureList *textures() const override;
|
const QPlatformTextureList *textures() const override;
|
||||||
void endCompositing() override;
|
void endCompositing() override;
|
||||||
|
@ -232,6 +232,14 @@ QWasmScreen *QWasmWindow::platformScreen() const
|
|||||||
return static_cast<QWasmScreen *>(window()->screen()->handle());
|
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()
|
void QWasmWindow::paint()
|
||||||
{
|
{
|
||||||
if (!m_backingStore || !isVisible() || m_context2d.isUndefined())
|
if (!m_backingStore || !isVisible() || m_context2d.isUndefined())
|
||||||
|
@ -85,7 +85,7 @@ public:
|
|||||||
void setMask(const QRegion ®ion) final;
|
void setMask(const QRegion ®ion) final;
|
||||||
|
|
||||||
QWasmScreen *platformScreen() const;
|
QWasmScreen *platformScreen() const;
|
||||||
void setBackingStore(QWasmBackingStore *store) { m_backingStore = store; }
|
void setBackingStore(QPlatformBackingStore *store) override;
|
||||||
QWasmBackingStore *backingStore() const { return m_backingStore; }
|
QWasmBackingStore *backingStore() const { return m_backingStore; }
|
||||||
QWindow *window() const { return m_window; }
|
QWindow *window() const { return m_window; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user