Add #[inline] attributes

This commit is contained in:
Pierre Krieger 2015-09-21 14:42:05 +02:00
parent 3820d307a3
commit aa9cb99929
23 changed files with 384 additions and 3 deletions

View file

@ -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()
}