Merge pull request #5274 from 21pages/fix

remove flutter extra "waiting for image"
This commit is contained in:
RustDesk
2023-08-07 10:44:33 +08:00
committed by GitHub
4 changed files with 55 additions and 54 deletions

View File

@@ -238,6 +238,13 @@ impl VideoRenderer {
// It is also Ok to skip this check.
if self.width != rgba.w || self.height != rgba.h {
log::error!(
"width/height mismatch: ({},{}) != ({},{})",
self.width,
self.height,
rgba.w,
rgba.h
);
return;
}
@@ -338,14 +345,6 @@ impl FlutterHandler {
*self.notify_rendered.write().unwrap() = false;
self.renderer.write().unwrap().set_size(width, height);
}
pub fn on_waiting_for_image_dialog_show(&self) {
#[cfg(any(feature = "flutter_texture_render"))]
{
*self.notify_rendered.write().unwrap() = false;
}
// rgba array render will notify every frame
}
}
impl InvokeUiSession for FlutterHandler {

View File

@@ -1254,12 +1254,6 @@ pub fn session_change_prefer_codec(session_id: SessionID) {
}
}
pub fn session_on_waiting_for_image_dialog_show(session_id: SessionID) {
if let Some(session) = SESSIONS.read().unwrap().get(&session_id) {
session.ui_handler.on_waiting_for_image_dialog_show();
}
}
pub fn main_set_home_dir(_home: String) {
#[cfg(any(target_os = "android", target_os = "ios"))]
{

View File

@@ -3,9 +3,7 @@ use hbb_common::password_security;
use hbb_common::{
allow_err,
config::{self, Config, LocalConfig, PeerConfig},
directories_next, log,
sodiumoxide::base64,
tokio,
directories_next, log, tokio,
};
use hbb_common::{
bytes::Bytes,
@@ -615,6 +613,7 @@ pub fn peer_to_map(id: String, p: PeerConfig) -> HashMap<&'static str, String> {
#[cfg(feature = "flutter")]
pub fn peer_to_map_ab(id: String, p: PeerConfig) -> HashMap<&'static str, String> {
use hbb_common::sodiumoxide::base64;
let mut m = peer_to_map(id, p.clone());
m.insert(
"hash",