Remove Mutex from FontSystem

This commit is contained in:
Edgar Geier 2023-03-12 10:30:20 +01:00
parent 46e9ef0246
commit 384c5c1fdc
No known key found for this signature in database
GPG key ID: DE2B55319457EB56
16 changed files with 109 additions and 96 deletions

View file

@ -99,7 +99,7 @@ fn shape_fallback(
}
fn shape_run(
font_system: &FontSystem,
font_system: &mut FontSystem,
line: &str,
attrs_list: &AttrsList,
start_run: usize,
@ -273,7 +273,7 @@ pub struct ShapeWord {
impl ShapeWord {
pub fn new(
font_system: &FontSystem,
font_system: &mut FontSystem,
line: &str,
attrs_list: &AttrsList,
word_range: Range<usize>,
@ -347,7 +347,7 @@ pub struct ShapeSpan {
impl ShapeSpan {
pub fn new(
font_system: &FontSystem,
font_system: &mut FontSystem,
line: &str,
attrs_list: &AttrsList,
span_range: Range<usize>,
@ -431,7 +431,7 @@ impl ShapeLine {
/// # Panics
///
/// Will panic if `line` contains more than one paragraph.
pub fn new(font_system: &FontSystem, line: &str, attrs_list: &AttrsList) -> Self {
pub fn new(font_system: &mut FontSystem, line: &str, attrs_list: &AttrsList) -> Self {
let mut spans = Vec::new();
let bidi = unicode_bidi::BidiInfo::new(line, None);