Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.

This commit is contained in:
Simon Sapin 2015-04-23 00:14:02 +02:00 committed by Josh Matthews
parent 7b87085c18
commit ef8edd4e87
168 changed files with 2247 additions and 2408 deletions

View file

@ -10,9 +10,6 @@ path = "lib.rs"
[dependencies.azure]
git = "https://github.com/servo/rust-azure"
[dependencies.cssparser]
git = "https://github.com/servo/rust-cssparser"
[dependencies.geom]
git = "https://github.com/servo/rust-geom"
@ -31,4 +28,8 @@ branch = "servo"
features = ["headless"]
[dependencies.offscreen_gl_context]
git = "https://github.com/ecoal95/rust-offscreen-rendering-context"
git = "https://github.com/servo/rust-offscreen-rendering-context"
[dependencies]
cssparser = "0.3.1"
num = "0.1.24"

View file

@ -13,13 +13,13 @@ use geom::point::Point2D;
use geom::rect::Rect;
use geom::size::Size2D;
use gfx::color;
use num::ToPrimitive;
use util::task::spawn_named;
use util::vec::byte_swap;
use cssparser::RGBA;
use std::borrow::ToOwned;
use std::mem;
use std::num::{Float, ToPrimitive};
use std::sync::mpsc::{channel, Sender};
impl<'a> CanvasPaintTask<'a> {

View file

@ -2,9 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![feature(collections)]
#![feature(core)]
#![feature(std_misc)]
#![feature(collections)]
#![feature(rustc_private)]
extern crate azure;
@ -13,6 +12,7 @@ extern crate geom;
extern crate gfx;
extern crate util;
extern crate gleam;
extern crate num;
extern crate offscreen_gl_context;
extern crate glutin;

View file

@ -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>) {