Update to latest rust-azure and rust-layers

We no longer need to implement from_azure_surface in Servo, now that
rust-layers is handling more of the glue between rust-layers and Azure.
This commit is contained in:
Martin Robinson 2015-01-12 16:00:07 -08:00
parent e6fe9f1409
commit c3d23a0630
10 changed files with 20 additions and 122 deletions

View file

@ -21,27 +21,3 @@ extern crate io_surface;
pub mod compositor_msg;
pub mod constellation_msg;
pub mod platform {
#[cfg(target_os="macos")]
pub mod macos {
#[cfg(target_os="macos")]
pub mod surface;
}
#[cfg(target_os="linux")]
pub mod linux {
#[cfg(target_os="linux")]
pub mod surface;
}
#[cfg(target_os="android")]
pub mod android {
#[cfg(target_os="android")]
pub mod surface;
}
pub mod surface;
}

View file

@ -1,20 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//! EGL-specific implementation of cross-process surfaces. This uses EGL surfaces.
use platform::surface::NativeSurfaceAzureMethods;
use azure::AzSkiaGrGLSharedSurfaceRef;
use layers::platform::surface::NativeSurface;
use std::mem;
impl NativeSurfaceAzureMethods for NativeSurface {
fn from_azure_surface(surface: AzSkiaGrGLSharedSurfaceRef) -> NativeSurface {
unsafe {
NativeSurface::from_image_khr(mem::transmute(surface))
}
}
}

View file

@ -1,20 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//! X11-specific implementation of cross-process surfaces. This uses X pixmaps.
use platform::surface::NativeSurfaceAzureMethods;
use azure::AzSkiaGrGLSharedSurfaceRef;
use layers::platform::surface::NativeSurface;
use std::mem;
impl NativeSurfaceAzureMethods for NativeSurface {
fn from_azure_surface(surface: AzSkiaGrGLSharedSurfaceRef) -> NativeSurface {
unsafe {
NativeSurface::from_pixmap(mem::transmute(surface))
}
}
}

View file

@ -1,25 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//! Mac OS-specific implementation of cross-process surfaces. This uses `IOSurface`, introduced
//! in Mac OS X 10.6 Snow Leopard.
use platform::surface::NativeSurfaceAzureMethods;
use azure::AzSkiaGrGLSharedSurfaceRef;
use io_surface::IOSurface;
use layers::platform::surface::NativeSurface;
use std::mem;
impl NativeSurfaceAzureMethods for NativeSurface {
fn from_azure_surface(surface: AzSkiaGrGLSharedSurfaceRef) -> NativeSurface {
unsafe {
let io_surface = IOSurface {
obj: mem::transmute(surface),
};
NativeSurface::from_io_surface(io_surface)
}
}
}

View file

@ -1,12 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//! Declarations of types for cross-process surfaces.
use azure::AzSkiaGrGLSharedSurfaceRef;
pub trait NativeSurfaceAzureMethods {
fn from_azure_surface(surface: AzSkiaGrGLSharedSurfaceRef) -> Self;
}