servoshell: fix lockups while animating (#30322)

* servoshell: fix lockups while animating

* move comment to external_present declaration

* disable needs_recomposite optimisation for now due to breakage

* fix compile error that only happens on ci

* fix more compile errors
This commit is contained in:
Delan Azabani 2023-09-12 11:30:43 +08:00 committed by GitHub
parent aad2dccc9c
commit 1bbd0c1e6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 80 additions and 25 deletions

View file

@ -62,7 +62,7 @@ use gaol::sandbox::{ChildSandbox, ChildSandboxMethods};
use gfx::font_cache_thread::FontCacheThread;
pub use gleam::gl;
use ipc_channel::ipc::{self, IpcSender};
use log::{error, warn, Log, Metadata, Record};
use log::{error, trace, warn, Log, Metadata, Record};
use media::{GLPlayerThreads, WindowGLContext};
pub use msg::constellation_msg::TopLevelBrowsingContextId as BrowserId;
use msg::constellation_msg::{PipelineNamespace, PipelineNamespaceId};
@ -717,6 +717,7 @@ where
}
let mut need_resize = false;
for event in events {
trace!("servo <- embedder EmbedderEvent {:?}", event);
need_resize |= self.handle_window_event(event);
}
if self.compositor.shutdown_state != ShutdownState::FinishedShuttingDown {
@ -764,6 +765,10 @@ where
pub fn present(&mut self) {
self.compositor.present();
}
pub fn recomposite(&mut self) {
self.compositor.composite();
}
}
fn create_embedder_channel(