remove global render texture instance
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
3ecf0cc685
commit
9a7a600407
@ -116,11 +116,7 @@ class _RemotePageState extends State<RemotePage>
|
|||||||
Wakelock.enable();
|
Wakelock.enable();
|
||||||
}
|
}
|
||||||
// Register texture.
|
// Register texture.
|
||||||
if (mainGetLocalBoolOptionSync(kOptionOpenNewConnInTabs)) {
|
_renderTexture = RenderTexture();
|
||||||
_renderTexture = RenderTexture();
|
|
||||||
} else {
|
|
||||||
_renderTexture = renderTexture;
|
|
||||||
}
|
|
||||||
_renderTexture.create(sessionId);
|
_renderTexture.create(sessionId);
|
||||||
|
|
||||||
_ffi.ffiModel.updateEventListener(sessionId, widget.id);
|
_ffi.ffiModel.updateEventListener(sessionId, widget.id);
|
||||||
|
@ -582,8 +582,6 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
|||||||
}
|
}
|
||||||
await windowManager.hide();
|
await windowManager.hide();
|
||||||
} else {
|
} else {
|
||||||
renderTexture.destroy();
|
|
||||||
|
|
||||||
// it's safe to hide the subwindow
|
// it's safe to hide the subwindow
|
||||||
final controller = WindowController.fromWindowId(kWindowId!);
|
final controller = WindowController.fromWindowId(kWindowId!);
|
||||||
if (Platform.isMacOS && await controller.isFullScreen()) {
|
if (Platform.isMacOS && await controller.isFullScreen()) {
|
||||||
|
@ -38,9 +38,4 @@ class RenderTexture {
|
|||||||
_textureKey = -1;
|
_textureKey = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static final RenderTexture instance = RenderTexture();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Global instance for separate texture
|
|
||||||
final renderTexture = RenderTexture.instance;
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user