diff options
author | Alexandra Cherdantseva <neluhus.vagus@gmail.com> | 2020-01-20 17:10:26 +0300 |
---|---|---|
committer | Alexandra Cherdantseva <neluhus.vagus@gmail.com> | 2020-02-27 01:53:57 +0300 |
commit | 0efdf54a16d785598a2e310733a43e51d8a521b8 (patch) | |
tree | acbe3b58b344b4a358bcb11ffc90810a852c53eb /src/plugins/platforms/wasm/qwasmcompositor.h | |
parent | e8793476ac0d17dbadf9e05c3cf826c0f9d46710 (diff) |
wasm: fix texture leak when window is destroyed in a different context
Reproduce:
Show first window in first canvas;
Show second window in second canvas;
After screens are rendered destroy first window in first canvas
Change-Id: Ifbeb4824c1fdedecf24d5d20e58613d15c066420
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmcompositor.h')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmcompositor.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcompositor.h b/src/plugins/platforms/wasm/qwasmcompositor.h index 98f4a79b27..422f990175 100644 --- a/src/plugins/platforms/wasm/qwasmcompositor.h +++ b/src/plugins/platforms/wasm/qwasmcompositor.h @@ -125,11 +125,13 @@ public: static QWasmTitleBarOptions makeTitleBarOptions(const QWasmWindow *window); static QRect titlebarRect(QWasmTitleBarOptions tb, QWasmCompositor::SubControls subcontrol); + QWasmScreen *screen(); + QOpenGLContext *context(); + private slots: void frame(); private: - QWasmScreen *screen(); void notifyTopWindowChanged(QWasmWindow *window); void drawWindow(QOpenGLTextureBlitter *blitter, QWasmScreen *screen, QWasmWindow *window); void drawWindowContent(QOpenGLTextureBlitter *blitter, QWasmScreen *screen, QWasmWindow *window); @@ -138,7 +140,6 @@ private: void drawWindowDecorations(QOpenGLTextureBlitter *blitter, QWasmScreen *screen, QWasmWindow *window); void drwPanelButton(); - QImage *m_frameBuffer; QScopedPointer<QOpenGLContext> m_context; QScopedPointer<QOpenGLTextureBlitter> m_blitter; |