Remove gleam dependency from io-surface.

This commit is contained in:
Josh Matthews
2020-06-26 11:30:09 -04:00
parent 762a01b90f
commit 68ddb7e51d
2 changed files with 7 additions and 5 deletions
+1 -2
View File
@@ -3,7 +3,7 @@ name = "io-surface"
description = "Bindings to IO Surface for macOS"
homepage = "https://github.com/servo/core-foundation-rs"
repository = "https://github.com/servo/core-foundation-rs"
version = "0.15.0"
version = "0.15.1"
authors = ["The Servo Project Developers"]
license = "MIT / Apache-2.0"
@@ -12,7 +12,6 @@ default-target = "x86_64-apple-darwin"
[dependencies]
libc = "0.2"
gleam = "0.7"
core-foundation = { path = "../core-foundation", version = "0.9" }
cgl = "0.3"
leaky-cow = "0.1.1"
+6 -3
View File
@@ -13,7 +13,6 @@
extern crate libc;
extern crate core_foundation;
extern crate cgl;
extern crate gleam;
extern crate leaky_cow;
// Rust bindings to the IOSurface framework on macOS.
@@ -21,14 +20,18 @@ extern crate leaky_cow;
use core_foundation::base::{CFRelease, CFRetain, CFTypeID, CFTypeRef, CFType, TCFType};
use core_foundation::dictionary::{CFDictionary, CFDictionaryRef};
use core_foundation::string::{CFString, CFStringRef};
use cgl::{kCGLNoError, CGLGetCurrentContext, CGLTexImageIOSurface2D, CGLErrorString};
use gleam::gl::{BGRA, GLenum, RGB, RGBA, TEXTURE_RECTANGLE_ARB, UNSIGNED_INT_8_8_8_8_REV};
use cgl::{kCGLNoError, CGLGetCurrentContext, CGLTexImageIOSurface2D, CGLErrorString, GLenum};
use libc::{c_int, size_t};
use std::os::raw::c_void;
use leaky_cow::LeakyCow;
use std::slice;
use std::ffi::CStr;
const BGRA: GLenum = 0x80E1;
const RGBA: GLenum = 0x1908;
const RGB: GLenum = 0x1907;
const TEXTURE_RECTANGLE_ARB: GLenum = 0x84F5;
const UNSIGNED_INT_8_8_8_8_REV: GLenum = 0x8367;
//static kIOSurfaceLockReadOnly: u32 = 0x1;
//static kIOSurfaceLockAvoidSync: u32 = 0x2;