diff --git a/frontends/rioterm/src/grid_emit.rs b/frontends/rioterm/src/grid_emit.rs index 5f08d806..51a3af89 100644 --- a/frontends/rioterm/src/grid_emit.rs +++ b/frontends/rioterm/src/grid_emit.rs @@ -577,6 +577,7 @@ fn normalized_to_u8(c: [f32; 4]) -> [u8; 4] { ] } +#[allow(clippy::too_many_arguments)] pub fn build_row_bg( row: &Row, cols: usize, diff --git a/frontends/rioterm/src/layout/mod.rs b/frontends/rioterm/src/layout/mod.rs index f2681aa8..2be55da4 100644 --- a/frontends/rioterm/src/layout/mod.rs +++ b/frontends/rioterm/src/layout/mod.rs @@ -241,6 +241,7 @@ impl ContextGrid { } #[inline] + #[allow(dead_code)] pub fn get_mut(&mut self, key: NodeId) -> Option<&mut ContextGridItem> { self.inner.get_mut(&key) } diff --git a/rio-backend/src/config/mod.rs b/rio-backend/src/config/mod.rs index 82285bdc..af5d3165 100644 --- a/rio-backend/src/config/mod.rs +++ b/rio-backend/src/config/mod.rs @@ -732,10 +732,6 @@ mod tests { assert!(!result.renderer.disable_unfocused_render); - assert_eq!( - result.renderer.performance, - renderer::Performance::default() - ); assert_eq!(result.fonts, SugarloafFonts::default()); assert_eq!(result.theme, String::default()); @@ -751,10 +747,6 @@ mod tests { fn test_if_explicit_defaults_match() { let result = create_temporary_config("defaults", &default_config_file_content()); - assert_eq!( - result.renderer.performance, - renderer::Performance::default() - ); let env_vars: Vec = vec![]; assert_eq!(result.env_vars, env_vars); assert_eq!(result.cursor.shape, default_cursor()); @@ -789,10 +781,6 @@ mod tests { let result = Config::load_from_path(&file_name); - assert_eq!( - result.renderer.performance, - renderer::Performance::default() - ); assert_eq!(result.fonts, SugarloafFonts::default()); assert_eq!(result.theme, String::default()); // Colors @@ -813,7 +801,6 @@ mod tests { "#, ); - assert_eq!(result.renderer.performance, renderer::Performance::Low); assert_eq!(result.renderer.backend, renderer::Backend::Vulkan); assert_eq!(result.fonts, SugarloafFonts::default()); assert_eq!(result.theme, String::default()); @@ -835,7 +822,6 @@ mod tests { ); assert!(!result.renderer.disable_occluded_render); - assert_eq!(result.renderer.performance, renderer::Performance::High); assert_eq!(result.fonts, SugarloafFonts::default()); assert_eq!(result.theme, String::default()); // Colors @@ -854,7 +840,6 @@ mod tests { "#, ); - assert_eq!(result.renderer.performance, renderer::Performance::High); assert_eq!(result.env_vars, [String::from("A=5"), String::from("B=8")]); assert_eq!(result.cursor.shape, default_cursor()); assert_eq!(result.fonts, SugarloafFonts::default()); @@ -884,7 +869,6 @@ mod tests { "#, ); - assert_eq!(result.renderer.performance, renderer::Performance::High); assert_eq!(result.cursor.shape, CursorShape::Underline); assert_eq!(result.fonts, SugarloafFonts::default()); assert_eq!(result.theme, String::default()); @@ -904,7 +888,6 @@ mod tests { "#, ); - assert_eq!(result.renderer.performance, renderer::Performance::High); assert_eq!(result.option_as_alt, String::from("Both")); assert_eq!(result.fonts, SugarloafFonts::default()); assert_eq!(result.theme, String::default()); @@ -925,10 +908,6 @@ mod tests { "#, ); - assert_eq!( - result.renderer.performance, - renderer::Performance::default() - ); assert_eq!(result.fonts, SugarloafFonts::default()); assert_eq!(result.theme, String::default()); // Colors @@ -950,10 +929,6 @@ mod tests { "#, ); - assert_eq!( - result.renderer.performance, - renderer::Performance::default() - ); assert_eq!(result.fonts, SugarloafFonts::default()); assert_eq!(result.theme, String::default()); // Bindings @@ -985,7 +960,6 @@ mod tests { "#, ); - assert_eq!(result.renderer.performance, renderer::Performance::Low); assert_eq!(result.fonts.size, 14.0); assert_eq!(result.line_height, 2.0); assert_eq!(result.margin.top, 0.0); @@ -1016,7 +990,6 @@ mod tests { "#, ); - assert_eq!(result.renderer.performance, renderer::Performance::High); assert_eq!(result.fonts, SugarloafFonts::default()); assert_eq!(result.theme, "lucario"); // Colors @@ -1157,7 +1130,6 @@ mod tests { "#, ); - assert_eq!(result.renderer.performance, renderer::Performance::Low); // Advanced assert!(result.renderer.disable_unfocused_render); assert!(result.use_fork); @@ -1210,7 +1182,6 @@ mod tests { "#, ); - assert_eq!(result.renderer.performance, renderer::Performance::Low); assert_eq!(result.renderer.backend, renderer::Backend::GL); // Developer assert_eq!(result.developer.log_level, String::from("INFO")); @@ -1453,7 +1424,6 @@ mod tests { // Backend should be set assert_eq!(result.renderer.backend, renderer::Backend::Metal); // Other fields should be preserved - assert_eq!(result.renderer.performance, renderer::Performance::High); assert!(result.renderer.disable_unfocused_render); } @@ -1554,7 +1524,6 @@ mod tests { assert_eq!(result.window.height, 768); // Renderer: performance overridden, disable_unfocused_render preserved - assert_eq!(result.renderer.performance, renderer::Performance::High); assert!(!result.renderer.disable_unfocused_render); // Navigation: clickable overridden, mode preserved diff --git a/rio-backend/src/crosswords/mod.rs b/rio-backend/src/crosswords/mod.rs index e73a4b0d..4f40c2e3 100644 --- a/rio-backend/src/crosswords/mod.rs +++ b/rio-backend/src/crosswords/mod.rs @@ -1609,6 +1609,7 @@ impl Crosswords { /// - `\0` cells inside a run of content become real spaces /// - trailing blanks at end of the run are dropped (caller decides /// whether to flush them via the `blank_cells` accumulator) + /// /// Returns true if the line emitted any non-blank content. fn append_cells( &self, diff --git a/sugarloaf/examples/draw_order.rs b/sugarloaf/examples/draw_order.rs index f778c34b..ead809fb 100644 --- a/sugarloaf/examples/draw_order.rs +++ b/sugarloaf/examples/draw_order.rs @@ -84,12 +84,15 @@ impl ApplicationHandler for Application { ) .expect("Sugarloaf instance should be created"); - sugarloaf.set_background_color(Some(wgpu::Color { - r: 0.1, - g: 0.1, - b: 0.1, - a: 1.0, - })); + sugarloaf.set_background_color(Some( + wgpu::Color { + r: 0.1, + g: 0.1, + b: 0.1, + a: 1.0, + } + .into(), + )); window.request_redraw(); self.sugarloaf = Some(sugarloaf); diff --git a/sugarloaf/examples/layer.rs b/sugarloaf/examples/layer.rs index 2e266748..3be443e5 100644 --- a/sugarloaf/examples/layer.rs +++ b/sugarloaf/examples/layer.rs @@ -76,7 +76,7 @@ impl ApplicationHandler for Application { ) .expect("Sugarloaf instance should be created"); - sugarloaf.set_background_color(Some(wgpu::Color::RED)); + sugarloaf.set_background_color(Some(wgpu::Color::RED.into())); window.request_redraw(); // we will add three layers diff --git a/sugarloaf/examples/line_height.rs b/sugarloaf/examples/line_height.rs index 0fac9fc1..71b0ba51 100644 --- a/sugarloaf/examples/line_height.rs +++ b/sugarloaf/examples/line_height.rs @@ -83,7 +83,7 @@ impl ApplicationHandler for Application { ) .expect("Sugarloaf instance should be created"); - sugarloaf.set_background_color(Some(wgpu::Color::BLUE)); + sugarloaf.set_background_color(Some(wgpu::Color::BLUE.into())); window.request_redraw(); self.sugarloaf = Some(sugarloaf); diff --git a/sugarloaf/examples/text.rs b/sugarloaf/examples/text.rs index 8a9f2c14..ba405bc5 100644 --- a/sugarloaf/examples/text.rs +++ b/sugarloaf/examples/text.rs @@ -77,7 +77,7 @@ impl ApplicationHandler for Application { ) .expect("Sugarloaf instance should be created"); - sugarloaf.set_background_color(Some(wgpu::Color::RED)); + sugarloaf.set_background_color(Some(wgpu::Color::RED.into())); window.request_redraw(); self.sugarloaf = Some(sugarloaf); diff --git a/sugarloaf/src/font/macos.rs b/sugarloaf/src/font/macos.rs index 4057f0d2..09d8220d 100644 --- a/sugarloaf/src/font/macos.rs +++ b/sugarloaf/src/font/macos.rs @@ -1282,7 +1282,7 @@ pub fn shape_text_utf16( #[cfg(test)] mod tests { use super::*; - use crate::font::constants::FONT_CASCADIAMONO_REGULAR; + use crate::font::constants::FONT_CASCADIAMONO_NF_REGULAR; use core_foundation::base::CFIndex; fn glyph_id_for_char(handle: &FontHandle, size: f64, ch: char) -> u16 { @@ -1308,7 +1308,7 @@ mod tests { #[test] fn shapes_ascii_monospace() { let handle = - FontHandle::from_bytes(FONT_CASCADIAMONO_REGULAR).expect("load font"); + FontHandle::from_bytes(FONT_CASCADIAMONO_NF_REGULAR).expect("load font"); let glyphs = shape_text(&handle, "Hello", 18.0); assert_eq!(glyphs.len(), 5, "one glyph per ASCII char"); @@ -1343,7 +1343,7 @@ mod tests { // CascadiaMono carries a well-formed OS/2 table, so we should get // real values — not the x-height/2 fallback. let handle = - FontHandle::from_bytes(FONT_CASCADIAMONO_REGULAR).expect("load font"); + FontHandle::from_bytes(FONT_CASCADIAMONO_NF_REGULAR).expect("load font"); let m = font_metrics(&handle, 24.0); assert!(m.strikeout_thickness > 0.0, "thickness should be positive"); @@ -1369,7 +1369,7 @@ mod tests { // path swapped indices for the slow-path output it'd still compile, // but the cluster values would be wrong for multi-byte text. let handle = - FontHandle::from_bytes(FONT_CASCADIAMONO_REGULAR).expect("load font"); + FontHandle::from_bytes(FONT_CASCADIAMONO_NF_REGULAR).expect("load font"); let glyphs = shape_text(&handle, "abcde", 18.0); for (i, g) in glyphs.iter().enumerate() { assert_eq!(g.cluster, i as u32); @@ -1381,7 +1381,7 @@ mod tests { // Mixed BMP non-ASCII: 'é' is 2 bytes in UTF-8, 1 code unit in UTF-16. // Byte offsets should jump accordingly. let handle = - FontHandle::from_bytes(FONT_CASCADIAMONO_REGULAR).expect("load font"); + FontHandle::from_bytes(FONT_CASCADIAMONO_NF_REGULAR).expect("load font"); let glyphs = shape_text(&handle, "aébc", 18.0); // Expected clusters: a=0, é=1, b=3 (after 2-byte é), c=4. assert_eq!(glyphs.len(), 4); @@ -1394,7 +1394,7 @@ mod tests { #[test] fn shapes_empty_input() { let handle = - FontHandle::from_bytes(FONT_CASCADIAMONO_REGULAR).expect("load font"); + FontHandle::from_bytes(FONT_CASCADIAMONO_NF_REGULAR).expect("load font"); assert!(shape_text(&handle, "", 18.0).is_empty()); } @@ -1404,7 +1404,7 @@ mod tests { // returns a font (usually the primary itself). The result must not be // null — Rio's lazy-discovery path relies on that. let primary = - FontHandle::from_bytes(FONT_CASCADIAMONO_REGULAR).expect("load primary"); + FontHandle::from_bytes(FONT_CASCADIAMONO_NF_REGULAR).expect("load primary"); let result = discover_fallback(&primary, 'A'); assert!( result.is_some(), @@ -1419,7 +1419,7 @@ mod tests { // back. The test asserts non-null and, to avoid being flaky on // different macOS versions, does not hardcode the PS name. let primary = - FontHandle::from_bytes(FONT_CASCADIAMONO_REGULAR).expect("load primary"); + FontHandle::from_bytes(FONT_CASCADIAMONO_NF_REGULAR).expect("load primary"); let fallback = discover_fallback(&primary, '\u{6C34}') .expect("CoreText should cascade to a CJK font for 水"); // The discovered font must cover the codepoint — the whole @@ -1448,7 +1448,7 @@ mod tests { // single-font fragment), but we still exercise the multi-run // path here because it's the cheapest invariant to regress on. let handle = - FontHandle::from_bytes(FONT_CASCADIAMONO_REGULAR).expect("load font"); + FontHandle::from_bytes(FONT_CASCADIAMONO_NF_REGULAR).expect("load font"); // "A水B" — the CJK "water" ideograph is not in CascadiaMono, so // CoreText will cascade into a system CJK font for the middle // glyph, splitting the line across 3 CTRuns. @@ -1493,7 +1493,7 @@ mod tests { // CTFontDescriptor → CTFont → rasterize. Verifies the FFI is wired // correctly and the ref-don't-copy CFData is accepted by // CTFontManagerCreateFontDescriptorFromData. - let handle = FontHandle::from_static_bytes(FONT_CASCADIAMONO_REGULAR) + let handle = FontHandle::from_static_bytes(FONT_CASCADIAMONO_NF_REGULAR) .expect("static bytes should parse"); let size = 18.0; let gid = glyph_id_for_char(&handle, size as f64, 'M'); @@ -1507,7 +1507,7 @@ mod tests { #[test] fn rasterizes_an_inked_glyph() { let handle = - FontHandle::from_bytes(FONT_CASCADIAMONO_REGULAR).expect("load font"); + FontHandle::from_bytes(FONT_CASCADIAMONO_NF_REGULAR).expect("load font"); let size = 24.0; let gid = glyph_id_for_char(&handle, size as f64, 'A'); let g = rasterize_glyph(&handle, gid, size, false, false, false) @@ -1541,7 +1541,7 @@ mod tests { // This test is a regression guard — if `cascade_list_for_languages` // ever returns empty for a legit font, dynamic fallback stops working. let handle = - FontHandle::from_bytes(FONT_CASCADIAMONO_REGULAR).expect("load font"); + FontHandle::from_bytes(FONT_CASCADIAMONO_NF_REGULAR).expect("load font"); let paths = default_cascade_list(&handle); assert!( !paths.is_empty(), @@ -1558,8 +1558,8 @@ mod tests { fn from_bytes_index_zero_matches_from_bytes() { // For a plain TTF the single font is at index 0; both loaders // should land on equivalent CTFonts. - let a = FontHandle::from_bytes(FONT_CASCADIAMONO_REGULAR).expect("a"); - let b = FontHandle::from_bytes_index(FONT_CASCADIAMONO_REGULAR, 0).expect("b"); + let a = FontHandle::from_bytes(FONT_CASCADIAMONO_NF_REGULAR).expect("a"); + let b = FontHandle::from_bytes_index(FONT_CASCADIAMONO_NF_REGULAR, 0).expect("b"); // Compare via a shape probe — identical glyph ids means same face. let gid_a = glyph_id_for_char(&a, 18.0, 'A'); let gid_b = glyph_id_for_char(&b, 18.0, 'A'); @@ -1568,7 +1568,7 @@ mod tests { #[test] fn from_bytes_index_out_of_range_returns_none() { - let h = FontHandle::from_bytes_index(FONT_CASCADIAMONO_REGULAR, 99); + let h = FontHandle::from_bytes_index(FONT_CASCADIAMONO_NF_REGULAR, 99); assert!(h.is_none(), "index 99 on a single-font TTF should fail"); } @@ -1589,7 +1589,7 @@ mod tests { #[test] fn zero_ink_glyph_yields_empty_bitmap() { let handle = - FontHandle::from_bytes(FONT_CASCADIAMONO_REGULAR).expect("load font"); + FontHandle::from_bytes(FONT_CASCADIAMONO_NF_REGULAR).expect("load font"); let size = 24.0; let gid = glyph_id_for_char(&handle, size as f64, ' '); let g = rasterize_glyph(&handle, gid, size, false, false, false) diff --git a/sugarloaf/src/font/mod.rs b/sugarloaf/src/font/mod.rs index a3d96c12..0aa72da5 100644 --- a/sugarloaf/src/font/mod.rs +++ b/sugarloaf/src/font/mod.rs @@ -1722,13 +1722,14 @@ mod postscript_resolver_tests { fn insert_populates_postscript_lookup() { // Read the PS name straight from the handle so the test doesn't // hardcode a value that changes if the bundled font is updated. - let handle = - crate::font::macos::FontHandle::from_static_bytes(FONT_CASCADIAMONO_REGULAR) - .expect("parse CascadiaMono"); + let handle = crate::font::macos::FontHandle::from_static_bytes( + FONT_CASCADIAMONO_NF_REGULAR, + ) + .expect("parse CascadiaMono"); let ps_name = handle.postscript_name(); let mut lib = FontLibraryData::default(); - let font_data = FontData::from_static_slice(FONT_CASCADIAMONO_REGULAR) + let font_data = FontData::from_static_slice(FONT_CASCADIAMONO_NF_REGULAR) .expect("load CascadiaMono"); lib.insert(font_data); @@ -1751,17 +1752,18 @@ mod postscript_resolver_tests { /// id, so first-wins is the correct policy. #[test] fn duplicate_insert_keeps_first_id() { - let handle = - crate::font::macos::FontHandle::from_static_bytes(FONT_CASCADIAMONO_REGULAR) - .expect("parse CascadiaMono"); + let handle = crate::font::macos::FontHandle::from_static_bytes( + FONT_CASCADIAMONO_NF_REGULAR, + ) + .expect("parse CascadiaMono"); let ps_name = handle.postscript_name(); let mut lib = FontLibraryData::default(); lib.insert( - FontData::from_static_slice(FONT_CASCADIAMONO_REGULAR).expect("load a"), + FontData::from_static_slice(FONT_CASCADIAMONO_NF_REGULAR).expect("load a"), ); lib.insert( - FontData::from_static_slice(FONT_CASCADIAMONO_REGULAR).expect("load b"), + FontData::from_static_slice(FONT_CASCADIAMONO_NF_REGULAR).expect("load b"), ); assert_eq!( lib.font_id_for_postscript_name(&ps_name), @@ -1782,7 +1784,7 @@ mod postscript_resolver_tests { let mut data = FontLibraryData::default(); data.insert( - FontData::from_static_slice(FONT_CASCADIAMONO_REGULAR).expect("load"), + FontData::from_static_slice(FONT_CASCADIAMONO_NF_REGULAR).expect("load"), ); let lib = FontLibrary { inner: Arc::new(parking_lot::RwLock::new(data)), @@ -1821,7 +1823,7 @@ mod postscript_resolver_tests { let mut data = FontLibraryData::default(); data.insert( - FontData::from_static_slice(FONT_CASCADIAMONO_REGULAR).expect("load"), + FontData::from_static_slice(FONT_CASCADIAMONO_NF_REGULAR).expect("load"), ); let lib = FontLibrary { inner: Arc::new(parking_lot::RwLock::new(data)), diff --git a/sugarloaf/src/renderer/mod.rs b/sugarloaf/src/renderer/mod.rs index 04d15afd..53c9f9b9 100644 --- a/sugarloaf/src/renderer/mod.rs +++ b/sugarloaf/src/renderer/mod.rs @@ -903,7 +903,14 @@ fn upload_background_image_texture( ); ImageTexture::Metal(mtl_tex) } - _ => return None, + // Vulkan goes through `Renderer::upload_background_image_vulkan` + // (the renderer holds the descriptor set + sampler this free fn + // can't see), so this match arm just declines and lets the + // dispatcher try the renderer-bound path. Linux-only. + #[cfg(target_os = "linux")] + crate::context::ContextType::Vulkan(_) => return None, + #[cfg(not(feature = "wgpu"))] + crate::context::ContextType::_Phantom(_) => unreachable!(), }; Some(ImageTextureEntry { gpu, @@ -2285,7 +2292,7 @@ impl Renderer { text.init_metal(&context.device, &context.command_queue); text.render_metal( render_encoder, - [context.size.width as f32, context.size.height as f32], + [context.size.width, context.size.height], ); true })(); diff --git a/sugarloaf/src/text.rs b/sugarloaf/src/text.rs index dc3d9c2d..1f5d4ae7 100644 --- a/sugarloaf/src/text.rs +++ b/sugarloaf/src/text.rs @@ -123,7 +123,11 @@ struct TextMetalState { instance_capacity: usize, } -#[cfg(feature = "wgpu")] +// On macOS the wgpu text path is never selected (we always go through +// Metal — see `sugarloaf.rs:1399`'s `cfg(not(target_os = "macos"))`). +// Excluding the struct from the macOS build keeps the unused atlases +// from tripping `dead_code` and shrinks `Text` by one Option field. +#[cfg(all(feature = "wgpu", not(target_os = "macos")))] struct TextWgpuState { device: wgpu::Device, queue: wgpu::Queue, @@ -226,7 +230,7 @@ pub struct Text { /// `FontLibraryData` read-lock isn't re-acquired per shape. #[cfg(not(target_os = "macos"))] font_data_cache: FxHashMap, - #[cfg(feature = "wgpu")] + #[cfg(all(feature = "wgpu", not(target_os = "macos")))] wgpu: Option, #[cfg(target_os = "linux")] vulkan: Option, @@ -255,7 +259,7 @@ impl Text { scale_ctx: swash::scale::ScaleContext::new(), #[cfg(not(target_os = "macos"))] font_data_cache: FxHashMap::default(), - #[cfg(feature = "wgpu")] + #[cfg(all(feature = "wgpu", not(target_os = "macos")))] wgpu: None, #[cfg(target_os = "linux")] vulkan: None, @@ -955,7 +959,7 @@ impl Text { // wgpu GPU backend - #[cfg(feature = "wgpu")] + #[cfg(all(feature = "wgpu", not(target_os = "macos")))] pub fn init_wgpu( &mut self, device: &wgpu::Device, @@ -1030,7 +1034,7 @@ impl Text { /// Record the UI text pass into `render_pass`. No-op if wgpu state /// isn't initialised or there are no instances this frame. - #[cfg(feature = "wgpu")] + #[cfg(all(feature = "wgpu", not(target_os = "macos")))] pub fn render_wgpu<'pass>( &'pass mut self, render_pass: &mut wgpu::RenderPass<'pass>, @@ -1195,7 +1199,7 @@ fn shaped_width(run: &ShapedRun) -> f32 { run.glyphs.iter().map(|g| g.advance).sum() } -#[cfg(feature = "wgpu")] +#[cfg(all(feature = "wgpu", not(target_os = "macos")))] fn bytemuck_instances(insts: &[TextInstance]) -> &[u8] { // Safety: TextInstance is repr(C) with all-primitive fields (no // padding surprises thanks to 4-byte alignment + explicit _pad). @@ -1371,7 +1375,7 @@ fn alloc_instance_buffer_metal(device: &metal::Device, capacity: usize) -> metal // wgpu pipeline construction -#[cfg(feature = "wgpu")] +#[cfg(all(feature = "wgpu", not(target_os = "macos")))] fn create_text_atlas_bgl_wgpu(device: &wgpu::Device) -> wgpu::BindGroupLayout { device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { label: Some("sugarloaf.text.atlas_bgl"), @@ -1400,7 +1404,7 @@ fn create_text_atlas_bgl_wgpu(device: &wgpu::Device) -> wgpu::BindGroupLayout { }) } -#[cfg(feature = "wgpu")] +#[cfg(all(feature = "wgpu", not(target_os = "macos")))] fn create_text_atlas_bg_wgpu( device: &wgpu::Device, layout: &wgpu::BindGroupLayout, @@ -1423,7 +1427,7 @@ fn create_text_atlas_bg_wgpu( }) } -#[cfg(feature = "wgpu")] +#[cfg(all(feature = "wgpu", not(target_os = "macos")))] fn alloc_instance_buffer_wgpu(device: &wgpu::Device, capacity: usize) -> wgpu::Buffer { let size = (capacity.max(1) * std::mem::size_of::()) as u64; device.create_buffer(&wgpu::BufferDescriptor { @@ -1434,7 +1438,7 @@ fn alloc_instance_buffer_wgpu(device: &wgpu::Device, capacity: usize) -> wgpu::B }) } -#[cfg(feature = "wgpu")] +#[cfg(all(feature = "wgpu", not(target_os = "macos")))] fn build_text_pipeline_wgpu( device: &wgpu::Device, format: wgpu::TextureFormat, @@ -1526,7 +1530,7 @@ fn build_text_pipeline_wgpu( }) } -#[cfg(feature = "wgpu")] +#[cfg(all(feature = "wgpu", not(target_os = "macos")))] fn premul_blend_wgpu() -> wgpu::BlendState { wgpu::BlendState { color: wgpu::BlendComponent {