yoda: iced_core + iced_wgpu cleanup (3→0 warnings)
Some checks failed
Audit / vulnerabilities (push) Has been cancelled
Check / wasm (push) Has been cancelled
Check / widget (push) Has been cancelled
Document / all (push) Has been cancelled
Format / all (push) Has been cancelled
Lint / all (push) Has been cancelled
Test / all (macOS-latest, 1.88) (push) Has been cancelled
Test / all (macOS-latest, beta) (push) Has been cancelled
Test / all (macOS-latest, stable) (push) Has been cancelled
Test / all (ubuntu-latest, 1.88) (push) Has been cancelled
Test / all (ubuntu-latest, beta) (push) Has been cancelled
Test / all (ubuntu-latest, stable) (push) Has been cancelled
Test / all (windows-latest, 1.88) (push) Has been cancelled
Test / all (windows-latest, beta) (push) Has been cancelled
Test / all (windows-latest, stable) (push) Has been cancelled
Some checks failed
Audit / vulnerabilities (push) Has been cancelled
Check / wasm (push) Has been cancelled
Check / widget (push) Has been cancelled
Document / all (push) Has been cancelled
Format / all (push) Has been cancelled
Lint / all (push) Has been cancelled
Test / all (macOS-latest, 1.88) (push) Has been cancelled
Test / all (macOS-latest, beta) (push) Has been cancelled
Test / all (macOS-latest, stable) (push) Has been cancelled
Test / all (ubuntu-latest, 1.88) (push) Has been cancelled
Test / all (ubuntu-latest, beta) (push) Has been cancelled
Test / all (ubuntu-latest, stable) (push) Has been cancelled
Test / all (windows-latest, 1.88) (push) Has been cancelled
Test / all (windows-latest, beta) (push) Has been cancelled
Test / all (windows-latest, stable) (push) Has been cancelled
iced_core/settings.rs: drop dead `From<Settings> for iced_winit::Settings` impl gated behind a `winit` feature that doesn't exist on iced_core (and shouldn't — that would invert the dep direction). The impl was unreachable code. iced_wgpu/window/compositor.rs: collapse the unused initial `adapter_options` declaration into the only branch that uses it (the fallback path that re-creates the instance with GL allowed). The original allocation was always re-assigned before being read. iced_wgpu/lib.rs: remove `Renderer::draw_overlay` — private debug method with no caller anywhere in the workspace. cargo fix then dropped the imports that became orphans (Color, Size, Vector, alignment). Leyoda 2026 – GPLv3
This commit is contained in:
parent
d33d068c17
commit
6b069b2b4b
3 changed files with 2 additions and 62 deletions
|
|
@ -63,13 +63,3 @@ impl Default for Settings {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "winit")]
|
||||
impl From<Settings> for iced_winit::Settings {
|
||||
fn from(settings: Settings) -> iced_winit::Settings {
|
||||
iced_winit::Settings {
|
||||
id: settings.id,
|
||||
fonts: settings.fonts,
|
||||
is_daemon: settings.is_daemon,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ pub use geometry::Geometry;
|
|||
use crate::core::renderer;
|
||||
use crate::core::{
|
||||
Background, Color, Font, Pixels, Point, Rectangle, Size,
|
||||
Transformation, Vector,
|
||||
Transformation,
|
||||
};
|
||||
use crate::graphics::mesh;
|
||||
use crate::graphics::text::{Editor, Paragraph};
|
||||
|
|
@ -671,50 +671,6 @@ impl Renderer {
|
|||
});
|
||||
}
|
||||
|
||||
fn draw_overlay(
|
||||
&mut self,
|
||||
overlay: &[impl AsRef<str>],
|
||||
viewport: &Viewport,
|
||||
) {
|
||||
use crate::core::Renderer as _;
|
||||
use crate::core::alignment;
|
||||
use crate::core::text::Renderer as _;
|
||||
|
||||
self.with_layer(
|
||||
Rectangle::with_size(viewport.logical_size()),
|
||||
|renderer| {
|
||||
for (i, line) in overlay.iter().enumerate() {
|
||||
let text = crate::core::Text {
|
||||
content: line.as_ref().to_owned(),
|
||||
bounds: viewport.logical_size(),
|
||||
size: Pixels(20.0),
|
||||
line_height: core::text::LineHeight::default(),
|
||||
font: Font::MONOSPACE,
|
||||
align_x: core::text::Alignment::Left,
|
||||
align_y: alignment::Vertical::Top,
|
||||
shaping: core::text::Shaping::Advanced,
|
||||
wrapping: core::text::Wrapping::Word,
|
||||
ellipsize: core::text::Ellipsize::None,
|
||||
};
|
||||
|
||||
renderer.fill_text(
|
||||
text.clone(),
|
||||
Point::new(11.0, 11.0 + 25.0 * i as f32),
|
||||
Color::from_rgba(0.9, 0.9, 0.9, 1.0),
|
||||
Rectangle::with_size(Size::INFINITE),
|
||||
);
|
||||
|
||||
renderer.fill_text(
|
||||
text,
|
||||
Point::new(11.0, 11.0 + 25.0 * i as f32)
|
||||
+ Vector::new(-1.0, -1.0),
|
||||
Color::BLACK,
|
||||
Rectangle::with_size(Size::INFINITE),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
impl core::Renderer for Renderer {
|
||||
|
|
|
|||
|
|
@ -138,12 +138,6 @@ impl Compositor {
|
|||
.clone()
|
||||
.and_then(|window| instance.create_surface(window).ok());
|
||||
|
||||
let mut adapter_options = wgpu::RequestAdapterOptions {
|
||||
power_preference: wgpu::PowerPreference::from_env()
|
||||
.unwrap_or(wgpu::PowerPreference::HighPerformance),
|
||||
compatible_surface: compatible_surface.as_ref(),
|
||||
force_fallback_adapter: false,
|
||||
};
|
||||
let mut adapter = None;
|
||||
#[cfg_attr(not(unix), allow(dead_code))]
|
||||
if std::env::var_os("WGPU_ADAPTER_NAME").is_none() {
|
||||
|
|
@ -205,7 +199,7 @@ impl Compositor {
|
|||
.await;
|
||||
compatible_surface = compatible_window
|
||||
.and_then(|window| instance.create_surface(window).ok());
|
||||
adapter_options = wgpu::RequestAdapterOptions {
|
||||
let adapter_options = wgpu::RequestAdapterOptions {
|
||||
power_preference: wgpu::PowerPreference::from_env()
|
||||
.unwrap_or(wgpu::PowerPreference::HighPerformance),
|
||||
compatible_surface: compatible_surface.as_ref(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue