mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
add android graphic surface layer using EGL extensions
This commit is contained in:
parent
a90d12eaee
commit
8d85f71573
4 changed files with 44 additions and 2 deletions
20
src/components/msg/platform/android/surface.rs
Normal file
20
src/components/msg/platform/android/surface.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* 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::cast;
|
||||
|
||||
impl NativeSurfaceAzureMethods for NativeSurface {
|
||||
fn from_azure_surface(surface: AzSkiaGrGLSharedSurfaceRef) -> NativeSurface {
|
||||
unsafe {
|
||||
NativeSurface::from_image_khr(cast::transmute(surface))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue