Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "surfman"
license = "MIT OR Apache-2.0 OR MPL-2.0"
edition = "2021"
version = "0.12.3"
version = "0.12.4"
authors = [
"Patrick Walton <pcwalton@mimiga.net>",
"Emilio Cobos Álvarez <emilio@crisal.io>",
Expand Down
6 changes: 6 additions & 0 deletions src/cgl/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,12 @@ impl Device {
/// show up in their associated widgets until this method is called.
pub fn present_bound_surface(&self, context: &mut Context) -> Result<(), Error> {
if let Framebuffer::Surface(surface) = &mut context.framebuffer {
// Presenting the surface is not a GL operation on macOS, it's just
// CoreAnimation and IOSurface management. This means that it will
// leave any unprocessed OpenGL commands in the pipeline. Flushing
// here ensures that doesn't happen.
unsafe { context.gl.flush() };

self.0.present_surface(&mut surface.system_surface)?;
surface.bind_to_texture(&context.gl);
}
Expand Down
Loading