Rename compositor to renderer

This commit is contained in:
Brian Anderson 2012-05-03 14:56:15 -07:00
parent 9bcf66e7a2
commit 0a08415e8c
4 changed files with 7 additions and 7 deletions

View file

@ -8,7 +8,7 @@ enum msg {
exit(comm::chan<()>) 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| task::spawn_listener {|po|
let draw_target_po = comm::port(); let draw_target_po = comm::port();
comm::send(osmain_ch, osmain::get_draw_target(comm::chan(draw_target_po))); comm::send(osmain_ch, osmain::get_draw_target(comm::chan(draw_target_po)));

View file

@ -1,6 +1,6 @@
fn input( fn input(
osmain_ch: comm::chan<osmain::msg>, osmain_ch: comm::chan<osmain::msg>,
draw_ch: comm::chan<gfx::compositor::msg>, draw_ch: comm::chan<gfx::renderer::msg>,
model_ch: comm::chan<()> model_ch: comm::chan<()>
) { ) {
task::spawn {|| task::spawn {||
@ -11,7 +11,7 @@ fn input(
_ { _ {
comm::send(model_ch, ()); comm::send(model_ch, ());
let draw_exit_confirm_po = comm::port(); 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::recv(draw_exit_confirm_po);
comm::send(osmain_ch, osmain::exit); comm::send(osmain_ch, osmain::exit);
break; break;

View file

@ -18,7 +18,7 @@ mod dom {
mod gfx { mod gfx {
mod geom; mod geom;
mod surface; mod surface;
mod compositor; mod renderer;
} }
mod image { mod image {

View file

@ -9,7 +9,7 @@ fn main() {
let osmain_ch = osmain::osmain(); let osmain_ch = osmain::osmain();
// The compositor // 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 // Not sure what this is but it decides what to draw
let model_ch = task::spawn_listener {|po| let model_ch = task::spawn_listener {|po|
@ -27,7 +27,7 @@ fn main() {
x1: x1, y1: y1, w1: w1, h1: h1, x1: x1, y1: y1, w1: w1, h1: h1,
x2: x2, y2: y2, w2: w2, h2: h2 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); std::timer::sleep(100u);
@ -43,5 +43,5 @@ fn main() {
}; };
// The keyboard handler // The keyboard handler
input::input(osmain_ch, draw_ch, model_ch); input::input(osmain_ch, renderer, model_ch);
} }