mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
refact, tab to window, remove rust cache data
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:texture_rgba_renderer/texture_rgba_renderer.dart';
|
||||
|
||||
@@ -21,7 +20,6 @@ class RenderTexture {
|
||||
_sessionId = sessionId;
|
||||
|
||||
textureRenderer.createTexture(_textureKey).then((id) async {
|
||||
debugPrint("id: $id, texture_key: $_textureKey");
|
||||
if (id != -1) {
|
||||
final ptr = await textureRenderer.getTexturePtr(_textureKey);
|
||||
platformFFI.registerTexture(sessionId, ptr);
|
||||
@@ -31,9 +29,11 @@ class RenderTexture {
|
||||
}
|
||||
}
|
||||
|
||||
destroy() async {
|
||||
destroy(bool unregisterTexture) async {
|
||||
if (useTextureRender && _textureKey != -1 && _sessionId != null) {
|
||||
platformFFI.registerTexture(_sessionId!, 0);
|
||||
if (unregisterTexture) {
|
||||
platformFFI.registerTexture(_sessionId!, 0);
|
||||
}
|
||||
await textureRenderer.closeTexture(_textureKey);
|
||||
_textureKey = -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user