aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/webgl_paint_task.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2015-04-23 00:14:02 +0200
committerJosh Matthews <josh@joshmatthews.net>2015-05-05 10:07:34 -0400
commitef8edd4e87aeb3cc71dfd9da2f69437080f5410e (patch)
tree9146cdd7126ead59c57cacbaa04eda0f16761f65 /components/canvas/webgl_paint_task.rs
parent7b87085c1880c60aa3be5b3ec4572a0d93fd5537 (diff)
downloadservo-ef8edd4e87aeb3cc71dfd9da2f69437080f5410e.tar.gz
servo-ef8edd4e87aeb3cc71dfd9da2f69437080f5410e.zip
Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.
Diffstat (limited to 'components/canvas/webgl_paint_task.rs')
-rw-r--r--components/canvas/webgl_paint_task.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/components/canvas/webgl_paint_task.rs b/components/canvas/webgl_paint_task.rs
index bfb97c9e076..fa399663c5d 100644
--- a/components/canvas/webgl_paint_task.rs
+++ b/components/canvas/webgl_paint_task.rs
@@ -163,7 +163,7 @@ impl WebGLPaintTask {
}
fn get_attrib_location(&self, program_id: u32, name: String, chan: Sender<i32> ) {
- let attrib_location = gl::get_attrib_location(program_id, name.as_slice());
+ let attrib_location = gl::get_attrib_location(program_id, &name);
chan.send(attrib_location).unwrap();
}
@@ -178,7 +178,7 @@ impl WebGLPaintTask {
}
fn get_uniform_location(&self, program_id: u32, name: String, chan: Sender<u32>) {
- let uniform_location = gl::get_uniform_location(program_id, name.as_slice());
+ let uniform_location = gl::get_uniform_location(program_id, &name);
chan.send(uniform_location as u32).unwrap();
}
@@ -202,8 +202,7 @@ impl WebGLPaintTask {
let dst_start = y * stride;
let src_start = (height - y - 1) * stride;
let src_slice = &orig_pixels[src_start .. src_start + stride];
- copy_memory(&mut pixels[dst_start .. dst_start + stride],
- &src_slice[..stride]);
+ copy_memory(&src_slice[..stride], &mut pixels[dst_start .. dst_start + stride]);
}
// rgba -> bgra
@@ -213,7 +212,7 @@ impl WebGLPaintTask {
fn shader_source(&self, shader_id: u32, source_lines: Vec<String>) {
let mut lines: Vec<&[u8]> = source_lines.iter().map(|line| line.as_bytes()).collect();
- gl::shader_source(shader_id, lines.as_mut_slice());
+ gl::shader_source(shader_id, &mut lines);
}
fn uniform_4fv(&self, uniform_id: u32, data: Vec<f32>) {