Update smithay-egui, egui, puffin

This commit is contained in:
Ian Douglas Scott 2023-10-03 18:48:31 -07:00
parent 974aef7476
commit 98755c1695
4 changed files with 131 additions and 52 deletions

View file

@ -9,7 +9,7 @@ use crate::{
},
state::{Common, Fps},
};
use egui::{Color32, Vec2};
use egui::{load::SizedTexture, Color32, Vec2};
use smithay::{
backend::{
drm::DrmNode,
@ -62,7 +62,7 @@ pub fn fps_ui(
area: Rectangle<i32, Logical>,
scale: f64,
) -> Result<TextureRenderElement<GlesTexture>, GlesError> {
use egui::widgets::plot::{Bar, BarChart, Legend, Plot};
use egui_plot::{Bar, BarChart, Legend, Plot};
let (max, min, avg, avg_fps) = (
fps.max_frametime().as_secs_f64(),
@ -176,7 +176,7 @@ pub fn fps_ui(
{
let factor = resp.rect.height() / size.y;
size = Vec2::from([size.x * factor, resp.rect.height()]);
ui.image(*texture_id, size);
ui.image(SizedTexture::new(*texture_id, size));
}
}
});

View file

@ -65,7 +65,7 @@ pub mod stack_hover;
pub mod swap_indicator;
#[cfg(feature = "debug")]
use egui::plot::{Corner, Legend, Plot, PlotPoints, Polygon};
use egui_plot::{Corner, Legend, Plot, PlotPoints, Polygon};
#[cfg(feature = "debug")]
use smithay::backend::renderer::{element::texture::TextureRenderElement, gles::GlesTexture};
#[cfg(feature = "debug")]