Ian Douglas Scott
1e7b9213d2
Merge remote-tracking branch 'origin/master' into damage
2023-06-02 15:03:10 -07:00
John Nunley
44248477be
feat: Add a function for retrieving the window contents
...
This function is useful for testing the window contents in certain cases. In addition,
this means that we can now have reliable tests for softbuffer's actual functionality.
Signed-off-by: John Nunley <jtnunley01@gmail.com>
Co-authored-by: dAxpeDDa <daxpedda@gmail.com>
2023-06-01 20:09:30 -07:00
Ian Douglas Scott
a147a15d45
Use u32/NonZeroU32 for Rect, and return error if out of range
2023-05-30 15:27:59 -07:00
Ian Douglas Scott
29b3f4a978
Add a Buffer::age() method
...
Fixes https://github.com/rust-windowing/softbuffer/issues/90 .
2023-04-26 15:04:20 -07:00
Ian Douglas Scott
c1d6716eec
Add a Buffer::present_with_damage() method
...
Supported on Wayland, X11, and Win32.
Fixes https://github.com/rust-windowing/softbuffer/issues/39 .
try_for_each
2023-04-26 11:58:11 -07:00
John Nunley
92e8eb7d22
Don't use the borrowing trick under Windows ( #89 )
2023-04-07 17:31:21 -07:00
Ian Douglas Scott
7a687105e3
Update windows-sys and image
2023-04-06 08:37:57 -07:00
Ian Douglas Scott
a09e4cf679
Owned pixel buffer for no-copy presentation
...
This is based on the API that will be used for no-copy presentation. But
wraps it in `set_buffer`.
This also fixes the Wayland buffer code to set `self.width` and
`self.height` on resize, and set the length of the shared memory file
when the buffer is created.
Co-authored-by: jtnunley <jtnunley01@gmail.com>
2023-04-06 10:30:59 +03:00
Ian Douglas Scott
fc1bba64ab
Rename SwBufError back to SoftBufferError
...
This seems to be the last thing left over from the `swbuf` rename.
2022-12-27 12:57:26 -08:00
Mads Marquart
ff5824b6a5
Avoid a bit of unsafe in Windows backend
2022-12-23 04:20:01 +01:00
Mads Marquart
89bd260fd8
Use #![deny(unsafe_op_in_unsafe_fn)]
2022-12-23 04:19:41 +01:00
jtnunley
319ff565a5
Use static dispatch
2022-12-22 10:09:47 -08:00
notgull
300a4d819a
chore: Clean up win32 and x11
2022-12-21 19:07:16 -07:00
Jeremy Soller
99d63063b6
Take a reference to a window in GraphicsContext::new, like glutin and wgpu
2022-12-20 13:40:54 -07:00
jtnunley
85b4f189bd
Port to win32
2022-12-20 09:11:45 -07:00
Jeremy Soller
95e8d05902
Rename SoftBufferError to SwBufError
2022-12-20 07:11:11 -07:00
David Johnson
d30d3255c2
Updated winit to 0.27.2 for examples and raw-window-handle to 0.5.0
2022-08-24 00:16:20 -05:00
David Johnson
dc6fc474be
Added better error handling
2022-01-16 09:01:02 -06:00
David Johnson
d89a0c92aa
Added windows support and made example render something fancier
2022-01-16 08:03:20 -06:00