don't actually invoke markTextureFrameAvailable on Android (the swapchain is attached to the window so this is not necessary

This commit is contained in:
Nick Fisher
2025-05-08 17:25:54 +08:00
parent 5af18cb99b
commit 04d3aee2e9

View File

@@ -168,8 +168,8 @@ class ThermionFlutterMethodChannelPlatform extends ThermionFlutterPlatform {
await FilamentApp.instance!.unregister(_swapChain!, view); await FilamentApp.instance!.unregister(_swapChain!, view);
await FilamentApp.instance!.destroySwapChain(_swapChain!); await FilamentApp.instance!.destroySwapChain(_swapChain!);
} }
_swapChain = _swapChain = await FilamentApp.instance!
await FilamentApp.instance!.createSwapChain(descriptor.windowHandle!); .createSwapChain(Pointer<Void>.fromAddress(descriptor.windowHandle!));
await FilamentApp.instance!.register(_swapChain!, view); await FilamentApp.instance!.register(_swapChain!, view);
} else { } else {
final color = await FilamentApp.instance! final color = await FilamentApp.instance!
@@ -204,9 +204,11 @@ class ThermionFlutterMethodChannelPlatform extends ThermionFlutterPlatform {
@override @override
Future markTextureFrameAvailable(PlatformTextureDescriptor texture) async { Future markTextureFrameAvailable(PlatformTextureDescriptor texture) async {
if (!Platform.isAndroid) {
await channel.invokeMethod( await channel.invokeMethod(
"markTextureFrameAvailable", texture.flutterTextureId); "markTextureFrameAvailable", texture.flutterTextureId);
} }
}
@override @override
Future<PlatformTextureDescriptor> resizeTexture( Future<PlatformTextureDescriptor> resizeTexture(