aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/egl
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-09-21 14:42:05 +0200
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-09-23 13:11:47 +0200
commitaa9cb99929ee1893699184ded888b2586455f016 (patch)
treeb16503dbfe2248beeed0f7d82b150e64e6453043 /src/api/egl
parent3820d307a3f23828790e8a46a9c46849592104d6 (diff)
downloadglutin-aa9cb99929ee1893699184ded888b2586455f016.tar.gz
glutin-aa9cb99929ee1893699184ded888b2586455f016.zip
Add #[inline] attributes
Diffstat (limited to 'src/api/egl')
-rw-r--r--src/api/egl/mod.rs5
1 files changed, 5 insertions, 0 deletions
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()
}