mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +00:00
Document Wayland specifics related to SurfaceTexture::present (#5093)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
This commit is contained in:
parent
e128d6c261
commit
886dc94f57
@ -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:
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user