fix: ignore session hook on android/ios

This commit is contained in:
Kingtous 2023-04-28 19:17:20 +08:00
parent 5c0f249390
commit 6da5bef064

View File

@ -502,6 +502,7 @@ impl InvokeUiSession for FlutterHandler {
#[cfg(not(feature = "flutter_texture_render"))] #[cfg(not(feature = "flutter_texture_render"))]
fn on_rgba(&self, rgba: &mut scrap::ImageRgb) { fn on_rgba(&self, rgba: &mut scrap::ImageRgb) {
// Give a chance for plugins or etc to hook a rgba data. // Give a chance for plugins or etc to hook a rgba data.
#[cfg(not(any(target_os = "android", target_os = "ios")))]
for (key, hook) in self.hooks.read().unwrap().iter() { for (key, hook) in self.hooks.read().unwrap().iter() {
match hook { match hook {
SessionHook::OnSessionRgba(cb) => { SessionHook::OnSessionRgba(cb) => {