platform: drop the owed root_input (platform-w3 wrote it); Flavor::rgba8_image (S-L190, platform-w1's row)

This commit is contained in:
Martin Ball
2026-11-18 17:25:43 +00:00
parent d01306be70
commit 4eba91fa62
3 changed files with 26 additions and 8 deletions
Generated
+21
View File
@@ -2660,6 +2660,7 @@ dependencies = [
"egui-wgpu",
"log",
"pollster 1.0.1",
"tempfile",
]
[[package]]
@@ -3375,11 +3376,13 @@ dependencies = [
"craft-docpath",
"craft-host",
"craft-theme",
"fmv-macos-events",
"futures-lite",
"js-sys",
"log",
"objc2-app-kit 0.3.2",
"objc2-foundation 0.3.2",
"rfd",
"serde",
"serde_json",
"sysinfo",
@@ -3388,6 +3391,7 @@ dependencies = [
"wasm-bindgen-test",
"web-sys",
"web-time",
"windows",
"wl-clipboard-rs",
"x11rb",
"xcap",
@@ -3464,12 +3468,15 @@ dependencies = [
"craft-ui",
"craft-winprint-gdi",
"egui",
"js-sys",
"log",
"miniz_oxide 0.9.1",
"roxmltree 0.21.2",
"serde",
"serde_json",
"tempfile",
"wasm-bindgen",
"web-sys",
"winprint",
"winsafe",
]
@@ -3638,11 +3645,14 @@ dependencies = [
"craft-host",
"craft-settings",
"dirs",
"log",
"serde",
"serde_json",
"tempfile",
"toml",
"toml_edit",
"wasm-bindgen-test",
"web-sys",
"web-time",
]
@@ -5737,6 +5747,17 @@ dependencies = [
"syn 2.0.119",
]
[[package]]
name = "fmv-macos-events"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90642cf66dde7f205dc8b42dfe57b47d0f3a29f571b832742883ef512e23fe55"
dependencies = [
"objc2 0.6.5",
"objc2-app-kit 0.3.2",
"objc2-foundation 0.3.2",
]
[[package]]
name = "fnv"
version = "1.0.7"
+5
View File
@@ -56,6 +56,11 @@ impl Flavor {
pub fn text(text: &str) -> Self {
Self::new(TEXT, text.as_bytes().to_vec())
}
/// The image of an [`RGBA8`] flavor's bytes; `None` when they are not a whole image (pf.C-P3, S-L190).
pub fn rgba8_image(&self) -> Option<ClipboardImage> {
super::convert::rgba8_image(&self.data)
}
}
/// A bitmap on the clipboard: straight (not premultiplied) RGBA8, rows top to bottom,
-8
View File
@@ -267,14 +267,6 @@ impl<T: Stored> PerViewport<Stamped<T>> {
}
}
/// This frame's wheel speed and Alt-code pages, from the `RootEnv` that `set_input` stored before egui ran the input
/// hook; the defaults when no input was set (owed by platform-w3, S-L151).
pub(crate) fn root_input(ctx: &Context) -> (crate::runtime::env::WheelSpeed, crate::runtime::env::AltCodePages) {
pass_state::with::<FrameState, _>(ctx, |state| {
state.input.as_ref().map(|input| (input.root.wheel, input.root.alt_codes.clone())).unwrap_or_default()
})
}
/// Registers the end hook's prune of a service's per-viewport records, once per service type.
pub(crate) fn register_prune(ctx: &Context, key: TypeId, prune: fn(&Context, &[ViewportId])) {
pass_state::with::<FrameState, _>(ctx, |state| {