mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Rename Runnable to Task
The changes are: * `*Runnable` -> `*Task`; * `RunnableMsg` -> `Task`; * `RunnableWrapper` -> `TaskCanceller`; * `MainThreadRunnable` -> `MainThreadTask`; * `wrap_runnable` -> `wrap_task`; * `get_runnable_wrapper` -> `task_canceller`; * `handler` -> `run`; * `main_thread_handler` -> `run_with_script_thread`.
This commit is contained in:
parent
52a6f63608
commit
56117d3185
38 changed files with 370 additions and 332 deletions
|
@ -36,7 +36,7 @@ use ipc_channel::ipc::{self, IpcSender};
|
|||
use js::jsapi::JSContext;
|
||||
use script_runtime::CommonScriptMsg;
|
||||
use script_runtime::ScriptThreadEventCategory::WebVREvent;
|
||||
use script_thread::Runnable;
|
||||
use script_thread::Task;
|
||||
use std::cell::Cell;
|
||||
use std::mem;
|
||||
use std::rc::Rc;
|
||||
|
@ -515,7 +515,7 @@ impl VRDisplay {
|
|||
address: address.clone(),
|
||||
sender: raf_sender.clone()
|
||||
};
|
||||
js_sender.send(CommonScriptMsg::RunnableMsg(WebVREvent, msg)).unwrap();
|
||||
js_sender.send(CommonScriptMsg::Task(WebVREvent, msg)).unwrap();
|
||||
|
||||
// Run Sync Poses in parallell on Render thread
|
||||
let msg = WebVRCommand::SyncPoses(display_id, near, far, sync_sender.clone());
|
||||
|
@ -613,8 +613,8 @@ struct NotifyDisplayRAF {
|
|||
sender: mpsc::Sender<Result<(f64, f64), ()>>
|
||||
}
|
||||
|
||||
impl Runnable for NotifyDisplayRAF {
|
||||
fn handler(self: Box<Self>) {
|
||||
impl Task for NotifyDisplayRAF {
|
||||
fn run(self: Box<Self>) {
|
||||
let display = self.address.root();
|
||||
display.handle_raf(&self.sender);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue