servo: Merge #3846 - Update to use CGL crate for mac (from glennw:cgl); r=metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: b8de54bc63a27ec55db683bba7430cbd0e4aa9e4
This commit is contained in:
Glenn Watson 2014-10-29 09:24:40 -06:00
Родитель 779c6bd37a
Коммит cfd1172702
5 изменённых файлов: 23 добавлений и 6 удалений

10
servo/Cargo.lock сгенерированный
Просмотреть файл

@ -48,6 +48,14 @@ dependencies = [
"util 0.0.1",
]
[[package]]
name = "cgl"
version = "0.0.1"
source = "git+https://github.com/servo/rust-cgl#0a8d726e57b4cd55bee9f7c743d29ae1cf8f3fc2"
dependencies = [
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#e308a8672f7d953f6484932b6a4aaae8a0cc2a50)",
]
[[package]]
name = "cocoa"
version = "0.1.0"
@ -220,12 +228,12 @@ name = "glfw_app"
version = "0.0.1"
dependencies = [
"alert 0.1.0 (git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e)",
"cgl 0.0.1 (git+https://github.com/servo/rust-cgl#0a8d726e57b4cd55bee9f7c743d29ae1cf8f3fc2)",
"compositing 0.0.1",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#b001a76e907befaae1d0d6dd259418a22092da86)",
"glfw 0.0.1 (git+https://github.com/servo/glfw-rs?ref=servo#a15c2d04b8969aea653841d1d79e5fdf68de664b)",
"layers 0.1.0 (git+https://github.com/servo/rust-layers#4282ee4203a2e706007b723f4fd3f5eca9541461)",
"msg 0.0.1",
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#e308a8672f7d953f6484932b6a4aaae8a0cc2a50)",
"util 0.0.1",
]

10
servo/ports/cef/Cargo.lock сгенерированный
Просмотреть файл

@ -59,6 +59,14 @@ dependencies = [
"util 0.0.1",
]
[[package]]
name = "cgl"
version = "0.0.1"
source = "git+https://github.com/servo/rust-cgl#0a8d726e57b4cd55bee9f7c743d29ae1cf8f3fc2"
dependencies = [
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#e308a8672f7d953f6484932b6a4aaae8a0cc2a50)",
]
[[package]]
name = "cocoa"
version = "0.1.0"
@ -231,12 +239,12 @@ name = "glfw_app"
version = "0.0.1"
dependencies = [
"alert 0.1.0 (git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e)",
"cgl 0.0.1 (git+https://github.com/servo/rust-cgl#0a8d726e57b4cd55bee9f7c743d29ae1cf8f3fc2)",
"compositing 0.0.1",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#b001a76e907befaae1d0d6dd259418a22092da86)",
"glfw 0.0.1 (git+https://github.com/servo/glfw-rs?ref=servo#a15c2d04b8969aea653841d1d79e5fdf68de664b)",
"layers 0.1.0 (git+https://github.com/servo/rust-layers#4282ee4203a2e706007b723f4fd3f5eca9541461)",
"msg 0.0.1",
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#e308a8672f7d953f6484932b6a4aaae8a0cc2a50)",
"util 0.0.1",
]

Просмотреть файл

@ -29,5 +29,5 @@ path = "../../components/msg"
[dependencies.util]
path = "../../components/util"
[dependencies.opengles]
git = "https://github.com/servo/rust-opengles"
[dependencies.cgl]
git = "https://github.com/servo/rust-cgl"

Просмотреть файл

@ -9,6 +9,8 @@
#![deny(unused_imports, unused_variable)]
extern crate alert;
#[cfg(target_os="macos")]
extern crate cgl;
extern crate compositing;
extern crate geom;
extern crate glfw;
@ -17,7 +19,6 @@ extern crate libc;
extern crate msg;
extern crate time;
extern crate util;
extern crate opengles;
use geom::scale_factor::ScaleFactor;
use std::rc::Rc;

Просмотреть файл

@ -162,7 +162,7 @@ impl WindowMethods for Window {
#[cfg(target_os="macos")]
fn native_metadata(&self) -> NativeGraphicsMetadata {
use opengles::cgl::{CGLGetCurrentContext, CGLGetPixelFormat};
use cgl::{CGLGetCurrentContext, CGLGetPixelFormat};
unsafe {
NativeGraphicsMetadata {
pixel_format: CGLGetPixelFormat(CGLGetCurrentContext()),