aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/glx/mod.rs
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-09-23 13:26:42 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-09-23 13:26:42 +0200
commitdc7c15b7d9572e5ad19f92cef101d1ca7d287261 (patch)
treeb16503dbfe2248beeed0f7d82b150e64e6453043 /src/api/glx/mod.rs
parent3820d307a3f23828790e8a46a9c46849592104d6 (diff)
parentaa9cb99929ee1893699184ded888b2586455f016 (diff)
downloadglutin-dc7c15b7d9572e5ad19f92cef101d1ca7d287261.tar.gz
glutin-dc7c15b7d9572e5ad19f92cef101d1ca7d287261.zip
Merge pull request #607 from tomaka/inline
Add #[inline] attributes
Diffstat (limited to 'src/api/glx/mod.rs')
-rw-r--r--src/api/glx/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/api/glx/mod.rs b/src/api/glx/mod.rs
index 7f54760..43bb1d7 100644
--- a/src/api/glx/mod.rs
+++ b/src/api/glx/mod.rs
@@ -77,6 +77,7 @@ impl GlContext for Context {
Ok(())
}
+ #[inline]
fn is_current(&self) -> bool {
unsafe { self.glx.GetCurrentContext() == self.context }
}
@@ -89,16 +90,19 @@ impl GlContext for Context {
}
}
+ #[inline]
fn swap_buffers(&self) -> Result<(), ContextError> {
// TODO: glutin needs some internal changes for proper error recovery
unsafe { self.glx.SwapBuffers(self.display as *mut _, self.window); }
Ok(())
}
+ #[inline]
fn get_api(&self) -> ::Api {
::Api::OpenGl
}
+ #[inline]
fn get_pixel_format(&self) -> PixelFormat {
self.pixel_format.clone()
}
@@ -129,6 +133,7 @@ pub struct ContextPrototype<'a> {
}
impl<'a> ContextPrototype<'a> {
+ #[inline]
pub fn get_visual_infos(&self) -> &ffi::XVisualInfo {
&self.visual_infos
}