mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Support running WebGL in its own thread or on the main thread.
This commit is contained in:
parent
ad82d67b2e
commit
39d13d1fc8
12 changed files with 429 additions and 202 deletions
|
@ -51,7 +51,7 @@ impl HeadlessContext {
|
|||
attribs.push(3);
|
||||
attribs.push(0);
|
||||
|
||||
let share = share.map_or(ptr::null_mut(), |share| share._context as *mut _);
|
||||
let share = share.map_or(ptr::null_mut(), |share| share.context as *mut _);
|
||||
|
||||
let context = unsafe { osmesa_sys::OSMesaCreateContextAttribs(attribs.as_ptr(), share) };
|
||||
|
||||
|
|
|
@ -251,7 +251,9 @@ impl ServoGlue {
|
|||
debug!("perform_updates");
|
||||
let events = mem::replace(&mut self.events, Vec::new());
|
||||
self.servo.handle_events(events);
|
||||
self.handle_servo_events()
|
||||
let r = self.handle_servo_events();
|
||||
debug!("done perform_updates");
|
||||
r
|
||||
}
|
||||
|
||||
/// In batch mode, Servo won't call perform_updates automatically.
|
||||
|
@ -628,7 +630,7 @@ impl WindowMethods for ServoWindowCallbacks {
|
|||
}
|
||||
|
||||
fn set_animation_state(&self, state: AnimationState) {
|
||||
debug!("WindowMethods::set_animation_state");
|
||||
debug!("WindowMethods::set_animation_state: {:?}", state);
|
||||
self.host_callbacks
|
||||
.on_animating_changed(state == AnimationState::Animating);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue