Skip to content

Commit 22ba885

Browse files
committed
Don't document zero-initializing
That the buffer is zeroed when `age == 0` is not guaranteed, e.g. on many platforms (Wayland, X11, Web), when we resize the buffer, we don't also clear it. We could technically guarantee something like "if the buffer's underlying data could not be reused, the buffer is zero-initialized", but that's not really useful to users (at least not unless we expose additional information in `Buffer::age`). This might also make it easier to use zero-copying on Android (might be able to avoid having to clear the buffer).
1 parent 672d180 commit 22ba885

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ impl<D: HasDisplayHandle, W: HasWindowHandle> Surface<D, W> {
197197
///
198198
/// The size must be set with [`Surface::resize`] or [`Surface::configure`] first.
199199
///
200-
/// The contents of the buffer may be zeroed, or may contain a previous frame. Call
200+
/// The contents of the buffer may be garbage, or may contain a previous frame. Call
201201
/// [`Buffer::age`] to determine this.
202202
///
203203
/// ## Platform Dependent Behavior

0 commit comments

Comments
 (0)