This is an rough solution to the issue described in #3396. XHRs still do their own thing and an overall clean up is in order. Before I do that, though, I'd really like someone to sign off on the overall idea. There's one major difference to what jdm layed out #3396: The timers remain with the window/worker and only the earliest expiring one is coordinated with the dedicated timer thread. That means both the timer thread and the window/worker have to keep track of which timer expires next, which feels a bit wonky. However, the upshot is that there's no need for communication with the timer thread when a pipeline is frozen, thawed or dropped. Most relvant parts are - the [`TimerScheduler`](6f5f661958 (diff-74137a6f50ab38e7a1e4d16920a66ce7R73)), which is the new per-constellation timer task and - the [`ActiveTimers`](6f5f661958 (diff-86707d952414a2860b78bcf6c1db8e2eR34)) which is what's left on the window/worker side. Source-Repo: https://github.com/servo/servo Source-Revision: 2de5407cdabef67ed03b2ad4edf4a22541d77875
63 lines
1.4 KiB
Rust
63 lines
1.4 KiB
Rust
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#![feature(box_syntax)]
|
|
#![feature(iter_cmp)]
|
|
#![feature(slice_bytes)]
|
|
#![feature(vec_push_all)]
|
|
#![feature(mpsc_select)]
|
|
#![feature(plugin)]
|
|
#![plugin(plugins)]
|
|
|
|
#![deny(unsafe_code)]
|
|
|
|
extern crate app_units;
|
|
#[macro_use]
|
|
extern crate log;
|
|
#[macro_use]
|
|
extern crate profile_traits;
|
|
#[macro_use]
|
|
extern crate util;
|
|
extern crate azure;
|
|
extern crate canvas;
|
|
extern crate canvas_traits;
|
|
extern crate clipboard;
|
|
|
|
#[cfg(target_os = "macos")]
|
|
extern crate core_graphics;
|
|
#[cfg(target_os = "macos")]
|
|
extern crate core_text;
|
|
|
|
extern crate devtools_traits;
|
|
extern crate euclid;
|
|
extern crate gfx;
|
|
extern crate gfx_traits;
|
|
extern crate gleam;
|
|
extern crate image;
|
|
extern crate ipc_channel;
|
|
extern crate layers;
|
|
extern crate layout_traits;
|
|
extern crate msg;
|
|
extern crate net_traits;
|
|
extern crate num;
|
|
extern crate offscreen_gl_context;
|
|
extern crate script_traits;
|
|
extern crate style_traits;
|
|
extern crate time;
|
|
extern crate url;
|
|
|
|
pub use compositor_task::{CompositorEventListener, CompositorProxy, CompositorTask};
|
|
pub use constellation::Constellation;
|
|
|
|
mod compositor;
|
|
mod compositor_layer;
|
|
mod headless;
|
|
mod scrolling;
|
|
mod surface_map;
|
|
mod timer_scheduler;
|
|
pub mod compositor_task;
|
|
pub mod constellation;
|
|
pub mod pipeline;
|
|
pub mod windowing;
|