mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
compositing: Support multiple events per frame.
Improves scrolling performance on Mac.
This commit is contained in:
parent
e52197d126
commit
0098d9e9e8
12 changed files with 67 additions and 59 deletions
|
@ -75,9 +75,9 @@ pub struct Browser {
|
|||
/// application Servo is embedded in. Clients then create an event
|
||||
/// loop to pump messages between the embedding application and
|
||||
/// various browser components.
|
||||
impl Browser {
|
||||
impl Browser {
|
||||
pub fn new<Window>(window: Option<Rc<Window>>) -> Browser
|
||||
where Window: WindowMethods + 'static {
|
||||
where Window: WindowMethods + 'static {
|
||||
// Global configuration options, parsed from the command line.
|
||||
let opts = opts::get();
|
||||
|
||||
|
@ -124,8 +124,8 @@ impl Browser {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn handle_event(&mut self, event: WindowEvent) -> bool {
|
||||
self.compositor.handle_event(event)
|
||||
pub fn handle_events(&mut self, events: Vec<WindowEvent>) -> bool {
|
||||
self.compositor.handle_events(events)
|
||||
}
|
||||
|
||||
pub fn repaint_synchronously(&mut self) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue