aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/msg/platform/android/surface.rs
diff options
context:
space:
mode:
authoraydin.kim <aydin.kim@samsung.com>2013-11-20 16:14:14 +0900
committeraydin.kim <aydin.kim@samsung.com>2013-12-30 09:58:03 +0900
commit8d85f71573e0092a7e41c3c33abe176ab94243fc (patch)
treeac605b6b8ca6984bdc7b73fce09ae92272cc068e /src/components/msg/platform/android/surface.rs
parenta90d12eaeecebed54dd928edf9a4a5cd5d93700f (diff)
downloadservo-8d85f71573e0092a7e41c3c33abe176ab94243fc.tar.gz
servo-8d85f71573e0092a7e41c3c33abe176ab94243fc.zip
add android graphic surface layer using EGL extensions
Diffstat (limited to 'src/components/msg/platform/android/surface.rs')
-rw-r--r--src/components/msg/platform/android/surface.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/components/msg/platform/android/surface.rs b/src/components/msg/platform/android/surface.rs
new file mode 100644
index 00000000000..04719ffdc39
--- /dev/null
+++ b/src/components/msg/platform/android/surface.rs
@@ -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))
+ }
+ }
+}
+