back to retained...
This commit is contained in:
491
flamegraph.svg
Normal file
491
flamegraph.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 93 KiB |
@@ -85,24 +85,24 @@ impl<'a> PainterCtx<'a> {
|
||||
};
|
||||
|
||||
if let Some((rid, size)) = active.resize {
|
||||
let checked = &mut HashMap::default();
|
||||
let mut ctx = SizeCtx {
|
||||
checked,
|
||||
text: self.text,
|
||||
textures: self.textures,
|
||||
widgets: self.widgets,
|
||||
size: UiVec2::FULL_SIZE,
|
||||
screen_size: self.screen_size,
|
||||
px_dependent: self.px_dependent,
|
||||
id,
|
||||
};
|
||||
let desired = ctx.size_inner(id, active.region.size());
|
||||
if size != desired {
|
||||
// let checked = &mut HashMap::default();
|
||||
// let mut ctx = SizeCtx {
|
||||
// checked,
|
||||
// text: self.text,
|
||||
// textures: self.textures,
|
||||
// widgets: self.widgets,
|
||||
// size: UiVec2::FULL_SIZE,
|
||||
// screen_size: self.screen_size,
|
||||
// px_dependent: self.px_dependent,
|
||||
// id,
|
||||
// };
|
||||
// let desired = ctx.size_inner(id, active.region.size());
|
||||
// if size != desired {
|
||||
self.redraw(rid);
|
||||
if self.draw_started.contains(&id) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
let Some(active) = self.remove(id) else {
|
||||
@@ -210,7 +210,9 @@ impl<'a> PainterCtx<'a> {
|
||||
layer,
|
||||
};
|
||||
for (cid, size) in sized_children {
|
||||
if let Some(w) = self.active.get_mut(&cid) {
|
||||
if let Some(w) = self.active.get_mut(&cid)
|
||||
&& w.resize.is_none()
|
||||
{
|
||||
w.resize = Some((id, size))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,14 +134,14 @@ impl Ui {
|
||||
}
|
||||
|
||||
fn redraw_updates(&mut self) {
|
||||
if self.updates.drain(..).next().is_some() {
|
||||
self.redraw_all();
|
||||
}
|
||||
// let mut ctx = PainterCtx::new(&mut self.data);
|
||||
// for id in self.updates.drain(..) {
|
||||
// ctx.redraw(id);
|
||||
// if self.updates.drain(..).next().is_some() {
|
||||
// self.redraw_all();
|
||||
// }
|
||||
// self.free();
|
||||
let mut ctx = PainterCtx::new(&mut self.data);
|
||||
for id in self.updates.drain(..) {
|
||||
ctx.redraw(id);
|
||||
}
|
||||
self.free();
|
||||
}
|
||||
|
||||
/// free any resources that don't have references anymore
|
||||
|
||||
@@ -3,8 +3,8 @@ use std::sync::Arc;
|
||||
use app::App;
|
||||
use arboard::Clipboard;
|
||||
use cosmic_text::Family;
|
||||
use render::Renderer;
|
||||
use iris::prelude::*;
|
||||
use render::Renderer;
|
||||
use winit::{event::WindowEvent, event_loop::ActiveEventLoop, window::Window};
|
||||
|
||||
use crate::testing::input::Input;
|
||||
|
||||
Reference in New Issue
Block a user