compositing: Support multiple events per frame.

Improves scrolling performance on Mac.
This commit is contained in:
Patrick Walton 2015-05-15 15:07:26 -07:00
parent e52197d126
commit 0098d9e9e8
12 changed files with 67 additions and 59 deletions

View file

@ -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) {