Repository: servo/core-foundation-rs (language: rust)

Issue:
Remove gleam dependency from io-surface
It's only used for 5 GL constants and 1 type (GLenum). We can write out the constant values directly and use the GLenum from [cgl-rs](https://github.com/servo/cgl-rs/blob/master/src/cgl.rs#L17).


Discussion / hints:
Yes please.

Fix patch:
diff --git a/io-surface/Cargo.toml b/io-surface/Cargo.toml
index 15d86ae85..7fe34e0e9 100644
--- a/io-surface/Cargo.toml
+++ b/io-surface/Cargo.toml
@@ -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"
diff --git a/io-surface/src/lib.rs b/io-surface/src/lib.rs
index adc52771b..5bf32a7b3 100644
--- a/io-surface/src/lib.rs
+++ b/io-surface/src/lib.rs
@@ -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;


Test patch: