mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Rename compositor to renderer
This commit is contained in:
parent
9bcf66e7a2
commit
0a08415e8c
4 changed files with 7 additions and 7 deletions
|
@ -8,7 +8,7 @@ enum msg {
|
|||
exit(comm::chan<()>)
|
||||
}
|
||||
|
||||
fn compositor(osmain_ch: comm::chan<osmain::msg>) -> comm::chan<msg> {
|
||||
fn renderer(osmain_ch: comm::chan<osmain::msg>) -> comm::chan<msg> {
|
||||
task::spawn_listener {|po|
|
||||
let draw_target_po = comm::port();
|
||||
comm::send(osmain_ch, osmain::get_draw_target(comm::chan(draw_target_po)));
|
|
@ -1,6 +1,6 @@
|
|||
fn input(
|
||||
osmain_ch: comm::chan<osmain::msg>,
|
||||
draw_ch: comm::chan<gfx::compositor::msg>,
|
||||
draw_ch: comm::chan<gfx::renderer::msg>,
|
||||
model_ch: comm::chan<()>
|
||||
) {
|
||||
task::spawn {||
|
||||
|
@ -11,7 +11,7 @@ fn input(
|
|||
_ {
|
||||
comm::send(model_ch, ());
|
||||
let draw_exit_confirm_po = comm::port();
|
||||
comm::send(draw_ch, gfx::compositor::exit(comm::chan(draw_exit_confirm_po)));
|
||||
comm::send(draw_ch, gfx::renderer::exit(comm::chan(draw_exit_confirm_po)));
|
||||
comm::recv(draw_exit_confirm_po);
|
||||
comm::send(osmain_ch, osmain::exit);
|
||||
break;
|
||||
|
|
|
@ -18,7 +18,7 @@ mod dom {
|
|||
mod gfx {
|
||||
mod geom;
|
||||
mod surface;
|
||||
mod compositor;
|
||||
mod renderer;
|
||||
}
|
||||
|
||||
mod image {
|
||||
|
|
|
@ -9,7 +9,7 @@ fn main() {
|
|||
let osmain_ch = osmain::osmain();
|
||||
|
||||
// The compositor
|
||||
let draw_ch = gfx::compositor::compositor(osmain_ch);
|
||||
let renderer = gfx::renderer::renderer(osmain_ch);
|
||||
|
||||
// Not sure what this is but it decides what to draw
|
||||
let model_ch = task::spawn_listener {|po|
|
||||
|
@ -27,7 +27,7 @@ fn main() {
|
|||
x1: x1, y1: y1, w1: w1, h1: h1,
|
||||
x2: x2, y2: y2, w2: w2, h2: h2
|
||||
};
|
||||
comm::send(draw_ch, gfx::compositor::draw(model));
|
||||
comm::send(renderer, gfx::renderer::draw(model));
|
||||
|
||||
std::timer::sleep(100u);
|
||||
|
||||
|
@ -43,5 +43,5 @@ fn main() {
|
|||
};
|
||||
|
||||
// The keyboard handler
|
||||
input::input(osmain_ch, draw_ch, model_ch);
|
||||
input::input(osmain_ch, renderer, model_ch);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue