mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Port gfx crate to new CF bindings.
This commit is contained in:
parent
a6e0157401
commit
4e1afca6bd
3 changed files with 15 additions and 16 deletions
|
@ -8,7 +8,6 @@
|
|||
use platform::surface::NativeSurfaceAzureMethods;
|
||||
|
||||
use azure::AzSkiaGrGLSharedSurfaceRef;
|
||||
use core_foundation::base::CFWrapper;
|
||||
use io_surface::IOSurface;
|
||||
use layers::platform::surface::NativeSurface;
|
||||
use std::cast;
|
||||
|
@ -17,7 +16,7 @@ impl NativeSurfaceAzureMethods for NativeSurface {
|
|||
fn from_azure_surface(surface: AzSkiaGrGLSharedSurfaceRef) -> NativeSurface {
|
||||
unsafe {
|
||||
let io_surface = IOSurface {
|
||||
contents: CFWrapper::wrap_owned(cast::transmute(surface)),
|
||||
obj: cast::transmute(surface),
|
||||
};
|
||||
NativeSurface::from_io_surface(io_surface)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue