Skip to content

Conversation

@madsmtm
Copy link
Member

@madsmtm madsmtm commented Nov 24, 2025

Use u32 in our public API instead of NonZeroU32, and handle width == 0 || height == 0 internally. This resolves #238. Note that there are still a few inconsistencies between platforms in how things are rendered when the buffer is smaller than the window, but that is pre-existing, see #177.

We can now also default to a 0-sized buffer instead of panicking in buffer_mut, which resolves #106.

Tested on:

  • Android
  • CoreGraphics
  • KMS/DRM
  • Orbital
  • Wayland
  • Web
  • Win32
  • X11

@madsmtm madsmtm added the enhancement New feature or request label Nov 24, 2025
@madsmtm madsmtm added DS - Android NDK DS - CoreGraphics macOS/iOS/tvOS/watchOS/visionOS backend DS - Orbital DS - Wayland DS - Web WebAssembly / WASM backend DS - Win32 Windows backend DS - X11 Xlib / Xcb backend DS - DRM/KMS labels Jan 14, 2026
@madsmtm madsmtm force-pushed the madsmtm/support-zero-sized branch 2 times, most recently from 5806393 to 76304d2 Compare January 14, 2026 04:49
@madsmtm madsmtm removed DS - Android NDK DS - CoreGraphics macOS/iOS/tvOS/watchOS/visionOS backend DS - Orbital DS - Wayland DS - Web WebAssembly / WASM backend DS - Win32 Windows backend DS - X11 Xlib / Xcb backend DS - DRM/KMS labels Jan 14, 2026
@madsmtm madsmtm added this to the Softbuffer v0.5 milestone Jan 14, 2026
@madsmtm madsmtm changed the base branch from master to madsmtm/web-niceties January 15, 2026 07:20
Base automatically changed from madsmtm/web-niceties to master January 17, 2026 07:22
@madsmtm madsmtm force-pushed the madsmtm/support-zero-sized branch 2 times, most recently from f94ac8b to 25462b5 Compare January 17, 2026 07:41
@madsmtm madsmtm force-pushed the madsmtm/support-zero-sized branch from 25462b5 to 1c25210 Compare January 17, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

Handle zero-sized buffers internally Initial Window Size

2 participants