From 270378a54e65258a22fcae2cd287b41b30ee606a Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Fri, 24 Oct 2014 15:31:55 +1000 Subject: [PATCH] Remove native metadata functions as they are now provided by the windowing system. Also remove glfw dependency. --- Cargo.toml | 5 ----- src/azure_hl.rs | 33 --------------------------------- src/lib.rs | 2 -- 3 files changed, 40 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2d72803..bbf24af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,11 +30,6 @@ git = "https://github.com/servo/rust-xlib" git = "https://github.com/servo/rust-egl" -[dependencies.glfw] - -git = "https://github.com/servo/glfw-rs" -branch = "servo" - [dependencies.freetype] git = "https://github.com/servo/rust-freetype" diff --git a/src/azure_hl.rs b/src/azure_hl.rs index ccebfb6..101b647 100644 --- a/src/azure_hl.rs +++ b/src/azure_hl.rs @@ -897,36 +897,3 @@ pub fn current_gl_context() -> AzGLContext { AzSkiaGetCurrentGLContext() } } - -#[cfg(target_os="linux")] -pub fn current_display() -> *mut c_void { - use glfw; - unsafe { - glfw::ffi::glfwGetX11Display() - } -} - -#[cfg(target_os="linux")] -pub fn current_graphics_metadata() -> NativeGraphicsMetadata { - NativeGraphicsMetadata { - display: current_display(), - } -} - -#[cfg(target_os="macos")] -pub fn current_graphics_metadata() -> NativeGraphicsMetadata { - use opengles::cgl::{CGLGetCurrentContext, CGLGetPixelFormat}; - unsafe { - NativeGraphicsMetadata { - pixel_format: CGLGetPixelFormat(CGLGetCurrentContext()), - } - } -} - -#[cfg(target_os="android")] -pub fn current_graphics_metadata() -> NativeGraphicsMetadata { - use egl::egl::GetCurrentDisplay; - NativeGraphicsMetadata { - display: GetCurrentDisplay(), - } -} diff --git a/src/lib.rs b/src/lib.rs index 8784e5c..e76279a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,8 +16,6 @@ extern crate opengles; extern crate xlib; #[cfg(target_os = "android")] extern crate egl; -#[cfg(not(target_os = "android"))] -extern crate glfw; #[cfg(not(target_os = "macos"))] extern crate freetype; #[cfg(target_os = "macos")]