From aa9cb99929ee1893699184ded888b2586455f016 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Mon, 21 Sep 2015 14:42:05 +0200 Subject: Add #[inline] attributes --- src/api/egl/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/api/egl') diff --git a/src/api/egl/mod.rs b/src/api/egl/mod.rs index 56b709d..0c0ec1f 100644 --- a/src/api/egl/mod.rs +++ b/src/api/egl/mod.rs @@ -44,6 +44,7 @@ pub struct Context { } #[cfg(target_os = "android")] +#[inline] fn get_native_display(egl: &ffi::egl::Egl, native_display: NativeDisplay) -> *const libc::c_void { unsafe { egl.GetDisplay(ffi::egl::DEFAULT_DISPLAY as *mut _) } @@ -278,6 +279,7 @@ impl GlContext for Context { } } + #[inline] fn is_current(&self) -> bool { unsafe { self.egl.GetCurrentContext() == self.context } } @@ -290,6 +292,7 @@ impl GlContext for Context { } } + #[inline] fn swap_buffers(&self) -> Result<(), ContextError> { let ret = unsafe { self.egl.SwapBuffers(self.display, self.surface) @@ -306,10 +309,12 @@ impl GlContext for Context { } } + #[inline] fn get_api(&self) -> Api { self.api } + #[inline] fn get_pixel_format(&self) -> PixelFormat { self.pixel_format.clone() } -- cgit v1.2.3