From 2d0199f1f57a3baf0c5c678923f729331d84fc78 Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Tue, 8 May 2018 10:16:27 -0400 Subject: [PATCH] Change io_surface::new() to take a typed CFDictionary. --- io-surface/Cargo.toml | 2 +- io-surface/src/lib.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/io-surface/Cargo.toml b/io-surface/Cargo.toml index 442970e..d26bfd9 100644 --- a/io-surface/Cargo.toml +++ b/io-surface/Cargo.toml @@ -3,7 +3,7 @@ name = "io-surface" description = "Bindings to IO Surface for OS X" homepage = "https://github.com/servo/core-foundation-rs" repository = "https://github.com/servo/core-foundation-rs" -version = "0.10.0" +version = "0.11.0" authors = ["The Servo Project Developers"] license = "MIT / Apache-2.0" diff --git a/io-surface/src/lib.rs b/io-surface/src/lib.rs index 93029eb..3883eae 100644 --- a/io-surface/src/lib.rs +++ b/io-surface/src/lib.rs @@ -18,9 +18,9 @@ extern crate leaky_cow; // Rust bindings to the IOSurface framework on Mac OS X. -use core_foundation::base::{CFRelease, CFRetain, CFTypeID, CFTypeRef, TCFType}; +use core_foundation::base::{CFRelease, CFRetain, CFTypeID, CFTypeRef, CFType, TCFType}; use core_foundation::dictionary::{CFDictionary, CFDictionaryRef}; -use core_foundation::string::CFStringRef; +use core_foundation::string::{CFString, CFStringRef}; use cgl::{kCGLNoError, CGLGetCurrentContext, CGLTexImageIOSurface2D, CGLErrorString}; use gleam::gl::{BGRA, GLenum, RGBA, TEXTURE_RECTANGLE_ARB, UNSIGNED_INT_8_8_8_8_REV}; use libc::{c_int, size_t}; @@ -100,7 +100,7 @@ impl TCFType for IOSurface { } } -pub fn new(properties: &CFDictionary) -> IOSurface { +pub fn new(properties: &CFDictionary) -> IOSurface { unsafe { TCFType::wrap_under_create_rule(IOSurfaceCreate(properties.as_concrete_TypeRef())) }