Merge pull request #44 from servo/bump-gleam

Upgrade gleam: 0.1 -> 0.2
This commit is contained in:
Corey Farwell
2015-12-13 13:01:00 -05:00
2 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -3,13 +3,13 @@ name = "io-surface"
description = "Bindings to IO Surface for OS X"
homepage = "https://github.com/servo/io-surface-rs"
repository = "https://github.com/servo/io-surface-rs"
version = "0.1.1"
version = "0.1.2"
authors = ["The Servo Project Developers"]
license = "MIT / Apache-2.0"
[dependencies]
libc = "0.2"
gleam = "0.1"
gleam = "0.2"
euclid = "0.4"
[target.x86_64-apple-darwin.dependencies]
+2 -4
View File
@@ -10,8 +10,7 @@
#![crate_name = "io_surface"]
#![crate_type = "rlib"]
#![feature(core)]
#![feature(slice_bytes)]
#![feature(clone_from_slice)]
extern crate libc;
extern crate core_foundation;
@@ -29,7 +28,6 @@ use cgl::{kCGLNoError, CGLGetCurrentContext, CGLTexImageIOSurface2D};
use gleam::gl::{BGRA, GLenum, RGBA, TEXTURE_RECTANGLE_ARB, UNSIGNED_INT_8_8_8_8_REV};
use libc::{c_int, c_void, size_t};
use std::mem;
use std::slice::bytes::copy_memory;
use std::slice;
@@ -153,7 +151,7 @@ impl IOSurface {
let size = (height * stride) as usize;
let address = IOSurfaceGetBaseAddress(surface) as *mut u8;
let dest: &mut [u8] = slice::from_raw_parts_mut(address, size);
copy_memory(data, dest);
dest.clone_from_slice(data);
// FIXME(pcwalton): RAII
IOSurfaceUnlock(surface, 0, &mut seed);