mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Partial font texture update (#1149)
This commit is contained in:
@@ -114,11 +114,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
let text_shape = TextShape::new(egui::Pos2::ZERO, galley);
|
||||
c.bench_function("tessellate_text", |b| {
|
||||
b.iter(|| {
|
||||
tessellator.tessellate_text(
|
||||
fonts.font_image().size(),
|
||||
text_shape.clone(),
|
||||
&mut mesh,
|
||||
);
|
||||
tessellator.tessellate_text(fonts.font_image_size(), text_shape.clone(), &mut mesh);
|
||||
mesh.clear();
|
||||
})
|
||||
});
|
||||
|
||||
@@ -343,10 +343,7 @@ impl Widget for &mut ItemsDemo {
|
||||
let image = PlotImage::new(
|
||||
texture,
|
||||
Value::new(0.0, 10.0),
|
||||
[
|
||||
ui.fonts().font_image().width() as f32 / 100.0,
|
||||
ui.fonts().font_image().height() as f32 / 100.0,
|
||||
],
|
||||
5.0 * vec2(texture.aspect_ratio(), 1.0),
|
||||
);
|
||||
|
||||
let plot = Plot::new("items_demo")
|
||||
|
||||
Reference in New Issue
Block a user