An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
fix, not unregister gpu texture when closeSession is false (#8018)
21pages712bfbae9227
diff --git a/flutter/lib/models/desktop_render_texture.dart b/flutter/lib/models/desktop_render_texture.dartindex e2bd8e691..3078115bb 100644--- a/flutter/lib/models/desktop_render_texture.dart+++ b/flutter/lib/models/desktop_render_texture.dart@@ -102,13 +102,15 @@ class _GpuTexture {}}- destroy(FFI ffi) async {+ destroy(bool unregisterTexture, FFI ffi) async {// must stop texture render, render unregistered texture cause crashif (!_destroying && support && _sessionId != null && _textureId != -1) {_destroying = true;- platformFFI.registerGpuTexture(_sessionId!, _display, 0);- // sleep for a while to avoid the texture is used after it's unregistered.- await Future.delayed(Duration(milliseconds: 100));+ if (unregisterTexture) {+ platformFFI.registerGpuTexture(_sessionId!, _display, 0);+ // sleep for a while to avoid the texture is used after it's unregistered.+ await Future.delayed(Duration(milliseconds: 100));+ }await gpuTextureRenderer.unregisterTexture(_textureId);_textureId = -1;_destroying = false;@@ -208,7 +210,7 @@ class TextureModel {_pixelbufferRenderTextures.remove(idx);}if (_gpuRenderTextures.containsKey(idx)) {- _gpuRenderTextures[idx]!.destroy(ffi);+ _gpuRenderTextures[idx]!.destroy(true, ffi);_gpuRenderTextures.remove(idx);}}@@ -235,7 +237,7 @@ class TextureModel {await texture.destroy(closeSession, ffi);}for (final texture in _gpuRenderTextures.values) {- await texture.destroy(ffi);+ await texture.destroy(closeSession, ffi);}}