diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-09-21 14:42:05 +0200 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-09-23 13:11:47 +0200 |
commit | aa9cb99929ee1893699184ded888b2586455f016 (patch) | |
tree | b16503dbfe2248beeed0f7d82b150e64e6453043 /src/platform/windows | |
parent | 3820d307a3f23828790e8a46a9c46849592104d6 (diff) | |
download | glutin-aa9cb99929ee1893699184ded888b2586455f016.tar.gz glutin-aa9cb99929ee1893699184ded888b2586455f016.zip |
Add #[inline] attributes
Diffstat (limited to 'src/platform/windows')
-rw-r--r-- | src/platform/windows/mod.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/platform/windows/mod.rs b/src/platform/windows/mod.rs index af9261f..1d55e71 100644 --- a/src/platform/windows/mod.rs +++ b/src/platform/windows/mod.rs @@ -59,6 +59,7 @@ pub struct Window(win32::Window); impl Window { /// See the docs in the crate root file. + #[inline] pub fn new(window: &WindowAttributes, pf_reqs: &PixelFormatRequirements, opengl: &GlAttributes<&Window>) -> Result<Window, CreationError> { @@ -70,12 +71,14 @@ impl Window { impl Deref for Window { type Target = win32::Window; + #[inline] fn deref(&self) -> &win32::Window { &self.0 } } impl DerefMut for Window { + #[inline] fn deref_mut(&mut self) -> &mut win32::Window { &mut self.0 } @@ -114,6 +117,7 @@ impl HeadlessContext { } impl GlContext for HeadlessContext { + #[inline] unsafe fn make_current(&self) -> Result<(), ContextError> { match self { &HeadlessContext::HiddenWindow(ref ctxt) => ctxt.make_current(), @@ -121,6 +125,7 @@ impl GlContext for HeadlessContext { } } + #[inline] fn is_current(&self) -> bool { match self { &HeadlessContext::HiddenWindow(ref ctxt) => ctxt.is_current(), @@ -128,6 +133,7 @@ impl GlContext for HeadlessContext { } } + #[inline] fn get_proc_address(&self, addr: &str) -> *const libc::c_void { match self { &HeadlessContext::HiddenWindow(ref ctxt) => ctxt.get_proc_address(addr), @@ -135,6 +141,7 @@ impl GlContext for HeadlessContext { } } + #[inline] fn swap_buffers(&self) -> Result<(), ContextError> { match self { &HeadlessContext::HiddenWindow(ref ctxt) => ctxt.swap_buffers(), @@ -142,6 +149,7 @@ impl GlContext for HeadlessContext { } } + #[inline] fn get_api(&self) -> Api { match self { &HeadlessContext::HiddenWindow(ref ctxt) => ctxt.get_api(), @@ -149,6 +157,7 @@ impl GlContext for HeadlessContext { } } + #[inline] fn get_pixel_format(&self) -> PixelFormat { match self { &HeadlessContext::HiddenWindow(ref ctxt) => ctxt.get_pixel_format(), |