Experimental wgpu WebGL backend support
- Added missing `draw_cache_align_4x4` call for `brush_glyph` on wasm32 target - Added WebGL support to `integratio_wgpu` example - Fixed test.yml CI workflow - Removed spir-v shader in `integration_wgpu`; Fixed formatting - Removed redundant `BoxStream` typedef
This commit is contained in:
parent
c75ed37148
commit
bdca20fc4a
21 changed files with 414 additions and 86 deletions
|
|
@ -6,15 +6,40 @@ use crate::command::{self, Command};
|
|||
/// A buffer for short-term storage and transfer within and between
|
||||
/// applications.
|
||||
#[allow(missing_debug_implementations)]
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
pub struct Clipboard;
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
impl Clipboard {
|
||||
/// Creates a new [`Clipboard`] for the given window.
|
||||
pub fn connect(_window: &winit::window::Window) -> Clipboard {
|
||||
Clipboard
|
||||
}
|
||||
|
||||
/// Reads the current content of the [`Clipboard`] as text.
|
||||
pub fn read(&self) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
/// Writes the given text contents to the [`Clipboard`].
|
||||
pub fn write(&mut self, _contents: String) {}
|
||||
}
|
||||
|
||||
/// A buffer for short-term storage and transfer within and between
|
||||
/// applications.
|
||||
#[allow(missing_debug_implementations)]
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub struct Clipboard {
|
||||
state: State,
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
enum State {
|
||||
Connected(window_clipboard::Clipboard),
|
||||
Unavailable,
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
impl Clipboard {
|
||||
/// Creates a new [`Clipboard`] for the given window.
|
||||
pub fn connect(window: &winit::window::Window) -> Clipboard {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue