mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-23 18:06:34 +11:00
[frame_stats] Show viewport resolution on the stats layer
Also set the stats layer toggle to be on by default until we add some UI to toggle it on mobile.
This commit is contained in:
parent
d7bacbcc3f
commit
bacaeebcb6
2 changed files with 9 additions and 1 deletions
|
@ -99,7 +99,7 @@ fn run(
|
||||||
let mut simple_text = SimpleText::new();
|
let mut simple_text = SimpleText::new();
|
||||||
let mut images = ImageCache::new();
|
let mut images = ImageCache::new();
|
||||||
let mut stats = stats::Stats::new();
|
let mut stats = stats::Stats::new();
|
||||||
let mut stats_toggle = false;
|
let mut stats_toggle = true;
|
||||||
let start = Instant::now();
|
let start = Instant::now();
|
||||||
|
|
||||||
let mut touch_state = multi_touch::TouchState::new();
|
let mut touch_state = multi_touch::TouchState::new();
|
||||||
|
|
|
@ -79,6 +79,14 @@ impl Snapshot {
|
||||||
offset * Affine::translate((left_margin, 3. * text_height)),
|
offset * Affine::translate((left_margin, 3. * text_height)),
|
||||||
&format!("Frame Time (max): {:.2} ms", self.frame_time_max_ms),
|
&format!("Frame Time (max): {:.2} ms", self.frame_time_max_ms),
|
||||||
);
|
);
|
||||||
|
text.add(
|
||||||
|
sb,
|
||||||
|
None,
|
||||||
|
text_size,
|
||||||
|
Some(&Brush::Solid(Color::WHITE)),
|
||||||
|
offset * Affine::translate((left_margin, 4. * text_height)),
|
||||||
|
&format!("Resolution: {viewport_width}x{viewport_height}"),
|
||||||
|
);
|
||||||
text.add(
|
text.add(
|
||||||
sb,
|
sb,
|
||||||
None,
|
None,
|
||||||
|
|
Loading…
Add table
Reference in a new issue