Add alignment parameter to set_text (#419)
* add alignment parameter to set_text * Fix doc comment
This commit is contained in:
parent
750e1a4dd1
commit
3c1f6c9e8a
10 changed files with 30 additions and 11 deletions
|
|
@ -26,7 +26,7 @@ fn layout(c: &mut Criterion) {
|
|||
|
||||
let mut run_on_text = |text: &str| {
|
||||
buffer.lines.clear();
|
||||
buffer.set_text(&mut fs, text, &ct::Attrs::new(), *shape);
|
||||
buffer.set_text(&mut fs, text, &ct::Attrs::new(), *shape, None);
|
||||
buffer.shape_until_scroll(&mut fs, false);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ fn bench_ascii_fast_path(c: &mut Criterion) {
|
|||
black_box(&ascii_text),
|
||||
&ct::Attrs::new(),
|
||||
ct::Shaping::Advanced,
|
||||
None,
|
||||
);
|
||||
buffer.shape_until_scroll(&mut fs, false);
|
||||
});
|
||||
|
|
@ -36,6 +37,7 @@ fn bench_bidi_processing(c: &mut Criterion) {
|
|||
black_box(&bidi_text),
|
||||
&ct::Attrs::new(),
|
||||
ct::Shaping::Advanced,
|
||||
None,
|
||||
);
|
||||
buffer.shape_until_scroll(&mut fs, false);
|
||||
});
|
||||
|
|
@ -56,6 +58,7 @@ fn bench_layout_heavy(c: &mut Criterion) {
|
|||
black_box(&layout_text),
|
||||
&ct::Attrs::new(),
|
||||
ct::Shaping::Advanced,
|
||||
None,
|
||||
);
|
||||
buffer.shape_until_scroll(&mut fs, false);
|
||||
});
|
||||
|
|
@ -81,6 +84,7 @@ fn bench_combined_stress(c: &mut Criterion) {
|
|||
black_box(&stress_text),
|
||||
&ct::Attrs::new(),
|
||||
ct::Shaping::Advanced,
|
||||
None,
|
||||
);
|
||||
buffer.shape_until_scroll(&mut fs, false);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue