John Nunley
0bcd2e22a2
breaking: Use raw-window-handle version 0.6
...
Signed-off-by: John Nunley <dev@notgull.net>
Co-Authored-By: dAxpeDDa <daxpedda@gmail.com>
2023-10-26 19:15:51 -07:00
Benoît Cortier
908408ba80
fix(web): optimize and fix present_with_damage ( #150 )
...
Co-authored-by: daxpedda <daxpedda@gmail.com>
2023-09-09 17:30:38 +02:00
dAxpeDDa
6c78268502
Implement OffscreenCanvas support
2023-06-05 01:39:28 +02:00
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
199a016f44
Merge remote-tracking branch 'origin/master' into damage
2023-05-30 14:25:45 -07:00
daxpedda
fcda747ddf
Add from_canvas() to Surface for Wasm ( #76 )
...
Co-authored-by: Toniman575 <toniman575@gmail.com>
2023-05-08 15:43:34 +02:00
daxpedda
d7888ef806
Implement present_with_damage for Web ( #101 )
2023-04-27 10:19:29 -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
jtnunley
74a3357ce8
Use the SwResultExt trait in more places
2023-04-06 11:09:47 -07:00
dAxpeDDa
c0af587718
Fix multi-threaded Wasm
2023-04-06 17:35:14 +02: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
John Nunley
33a4c3741b
m: Cache document in web frontend ( #66 )
2023-01-14 05:48:44 +00: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
John Nunley
5674886dfa
Add reformat to the CI ( #21 )
2022-12-22 12:35:18 -08:00
jtnunley
319ff565a5
Use static dispatch
2022-12-22 10:09:47 -08: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
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
Liam Murphy
d735510f72
Add web support
...
A limitation of this implementation is that it can't coexist with anything which creates a canvas context other than `CanvasRenderingContext2D`, since only one context can exist per canvas.
2022-02-12 20:24:18 +11:00