Document Wayland specifics related to SurfaceTexture::present (#5093)

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
This commit is contained in:
i509VCB 2024-01-21 17:10:56 -06:00 committed by GitHub
parent e128d6c261
commit 886dc94f57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -39,6 +39,10 @@ Bottom level categories:
## Unreleased
### Documentation
- Document Wayland specific behavior related to `SurfaceTexture::present`. By @i509VCB in [#5092](https://github.com/gfx-rs/wgpu/pull/5092).
### New features
- Many numeric built-ins have had a constant evaluation implementation added for them, which allows them to be used in a `const` context:

View File

@ -4738,6 +4738,12 @@ impl SurfaceTexture {
/// Schedule this texture to be presented on the owning surface.
///
/// Needs to be called after any work on the texture is scheduled via [`Queue::submit`].
///
/// # Platform dependent behavior
///
/// On Wayland, `present` will attach a `wl_buffer` to the underlying `wl_surface` and commit the new surface
/// state. If it is desired to do things such as request a frame callback, scale the surface using the viewporter
/// or synchronize other double buffered state, then these operations should be done before the call to `present`.
pub fn present(mut self) {
self.presented = true;
DynContext::surface_present(