diff options
Diffstat (limited to 'alacritty/src/display/window.rs')
-rw-r--r-- | alacritty/src/display/window.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/alacritty/src/display/window.rs b/alacritty/src/display/window.rs index 493e5ef9..712b4ac9 100644 --- a/alacritty/src/display/window.rs +++ b/alacritty/src/display/window.rs @@ -39,7 +39,7 @@ use glutin::platform::windows::IconExtWindows; use glutin::window::{ CursorIcon, Fullscreen, UserAttentionType, Window as GlutinWindow, WindowBuilder, WindowId, }; -use glutin::{self, ContextBuilder, PossiblyCurrent, WindowedContext}; +use glutin::{self, ContextBuilder, PossiblyCurrent, Rect, WindowedContext}; #[cfg(target_os = "macos")] use objc::{msg_send, sel, sel_impl}; #[cfg(target_os = "macos")] @@ -428,6 +428,14 @@ impl Window { self.windowed_context.swap_buffers().expect("swap buffers"); } + pub fn swap_buffers_with_damage(&self, damage: &[Rect]) { + self.windowed_context.swap_buffers_with_damage(damage).expect("swap buffes with damage"); + } + + pub fn swap_buffers_with_damage_supported(&self) -> bool { + self.windowed_context.swap_buffers_with_damage_supported() + } + pub fn resize(&self, size: PhysicalSize<u32>) { self.windowed_context.resize(size); } |