mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
deactive profiler when not in use; use newtype structs for task chans
This commit is contained in:
parent
17864cb25d
commit
c804db0f93
7 changed files with 55 additions and 92 deletions
|
@ -59,19 +59,12 @@ pub fn BufferRequest(screen_rect: Rect<uint>, page_rect: Rect<f32>) -> BufferReq
|
|||
}
|
||||
|
||||
#[deriving(Clone)]
|
||||
pub struct RenderChan<T> {
|
||||
chan: SharedChan<Msg<T>>,
|
||||
}
|
||||
|
||||
pub struct RenderChan<T>{chan:SharedChan<Msg<T>>}
|
||||
impl<T> RenderChan<T> {
|
||||
pub fn new(chan: Chan<Msg<T>>) -> RenderChan<T> {
|
||||
RenderChan {
|
||||
chan: SharedChan::new(chan),
|
||||
}
|
||||
}
|
||||
pub fn send(&self, msg: Msg<T>) {
|
||||
self.chan.send(msg);
|
||||
RenderChan{chan:SharedChan::new(chan)}
|
||||
}
|
||||
pub fn send(&self, msg: Msg<T>) { self.chan.send(msg) }
|
||||
}
|
||||
|
||||
struct RenderTask<C,T> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue