mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
e6fe9f1409
commit
c3d23a0630
10 changed files with 20 additions and 122 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue