Skip to content

Commit

Permalink
egl/surface: fix swap_buffers_with_damage
Browse files Browse the repository at this point in the history
The wrong amount of rects were commited in those functions leading
to spurious rectangles being sent to the system compositor.
  • Loading branch information
kchibisov authored Dec 6, 2022
1 parent b4d54f9 commit 5455402
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Unreleased

- Fixed wrong amount of rects commited in `Surface::swap_buffers_with_damage` with EGL.

# Version 0.30.2

- Fixed robust context creation with EGL.
Expand Down
4 changes: 2 additions & 2 deletions glutin/src/api/egl/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ impl<T: SurfaceTypeTrait> Surface<T> {
*self.display.inner.raw,
self.raw,
rects.as_ptr() as *mut _,
(rects.len() * 4) as _,
rects.len() as _,
)
} else if self
.display
Expand All @@ -267,7 +267,7 @@ impl<T: SurfaceTypeTrait> Surface<T> {
*self.display.inner.raw,
self.raw,
rects.as_ptr() as *mut _,
(rects.len() * 4) as _,
rects.len() as _,
)
} else {
self.display.inner.egl.SwapBuffers(*self.display.inner.raw, self.raw)
Expand Down

0 comments on commit 5455402

Please sign in to comment.