Update for nocopy changes

This commit is contained in:
Brian Anderson 2012-05-26 15:20:42 -07:00
parent 8b013462d5
commit 9bb970d385
9 changed files with 14 additions and 14 deletions

View file

@ -54,7 +54,7 @@ impl to_float for u8 {
fn draw_solid_color(draw_target: AzDrawTargetRef, item: dl::display_item,
r: u8, g: u8, b: u8) {
let bounds = (*item).bounds;
let bounds = copy (*item).bounds;
let red_color = {
r: r.to_float() as AzFloat,
@ -83,7 +83,7 @@ fn draw_image(draw_target: AzDrawTargetRef, item: dl::display_item,
-image: ~image) {
// FIXME: This is hideously inefficient.
let bounds = (*item).bounds;
let bounds = copy (*item).bounds;
if (image.depth < 3u) {
#debug("TODO: can't draw images with depth less than 3 yet");

View file

@ -22,7 +22,7 @@ impl format for format {
fn image_surface(size: geom::size<int>, format: format) -> image_surface {
{
size: size,
size: copy size,
format: format,
buffer: vec::from_elem((size.area() as uint) * format.bpp(), 0u8)
}

View file

@ -101,7 +101,7 @@ impl layout_methods for @box {
#[doc="The trivial reflow routine for instrinsically-sized frames."]
fn reflow_intrinsic(size: geom::size<au>) {
self.bounds.size = size;
self.bounds.size = copy size;
#debug["reflow_intrinsic size=%?", self.bounds];
}
@ -123,7 +123,7 @@ impl node_methods_priv for node {
s += " ";
}
s += #fmt("%?", self.rd({ |n| n.kind }));
s += #fmt("%?", self.rd({ |n| copy n.kind }));
#debug["%s", s];
for ntree.each_child(self) { |kid| kid.dump_indent(indent + 1u) }

View file

@ -149,12 +149,12 @@ impl box_builder_priv for node {
computes the intrinsic size.
"]
fn determine_box_kind() -> box_kind {
alt self.rd({ |n| n.kind }) {
alt self.rd({ |n| copy n.kind }) {
~nk_text(string) { bk_text(@text_box(string)) }
~nk_element(element) {
alt *element.subclass {
es_div { bk_block }
es_img(size) { bk_intrinsic(@size) }
es_img(size) { bk_intrinsic(@copy size) }
es_unknown { bk_inline }
}
}

View file

@ -66,7 +66,7 @@ fn box_to_display_item(box: @base::box) -> dl::display_item {
some(image) {
item = dl::display_item({
item_type: dl::display_item_image(~copy *image),
bounds: box.bounds
bounds: copy box.bounds
});
}
none {
@ -75,7 +75,7 @@ fn box_to_display_item(box: @base::box) -> dl::display_item {
item_type: dl::display_item_solid_color(r.next() as u8,
r.next() as u8,
r.next() as u8),
bounds: box.bounds
bounds: copy box.bounds
});
}
}

View file

@ -43,7 +43,7 @@ impl style_priv for node {
"]
fn recompute_style() {
let default_style: computed_style =
default_style_for_node_kind(self.rd { |n| *n.kind });
default_style_for_node_kind(self.rd { |n| copy *n.kind });
#debug("recomputing style; parent node:");
@ -69,7 +69,7 @@ impl style_methods for node {
if !self.has_aux() {
fail "get_computed_style() called on a node without a style!";
}
ret self.aux({ |x| x }).computed_style;
ret copy self.aux({ |x| copy x }).computed_style;
}
#[doc="

View file

@ -23,7 +23,7 @@ impl text_layout_methods for @box {
};
let run = text_run(subbox.text);
subbox.run = some(run);
subbox.run = some(copy run);
run.shape();
self.bounds.size = {

View file

@ -198,7 +198,7 @@ fn destroy_surface(surface: surface) {
}
#[doc = "A function for spawning into the platform's main thread"]
fn on_osmain<T: send>(f: fn~(comm::port<T>)) -> comm::chan<T> {
fn on_osmain<T: send>(+f: fn~(comm::port<T>)) -> comm::chan<T> {
let builder = task::builder();
let opts = {
sched: some({

View file

@ -24,7 +24,7 @@ class glyph {
new(codepoint: uint, pos: glyph_pos) {
self.codepoint = codepoint;
self.pos = pos;
self.pos = copy pos;
}
}