Checkpoint
This commit is contained in:
parent
02d6b91b73
commit
c8bc68c267
4 changed files with 2 additions and 7 deletions
|
@ -165,8 +165,6 @@ impl AppContext {
|
|||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
dbg!(&dirty_window_ids);
|
||||
|
||||
for dirty_window_id in dirty_window_ids {
|
||||
self.update_window(dirty_window_id, |cx| cx.draw())
|
||||
.unwrap()
|
||||
|
|
|
@ -75,12 +75,9 @@ impl<S: Send + Sync + 'static> Element for Img<S> {
|
|||
let corner_radii = style.corner_radii.to_pixels(bounds, cx.rem_size());
|
||||
cx.paint_image(bounds, corner_radii, order, data, self.grayscale)?;
|
||||
} else {
|
||||
dbg!("not loaded");
|
||||
cx.spawn(|view, mut cx| async move {
|
||||
dbg!("awaiting image future");
|
||||
if image_future.await.log_err().is_some() {
|
||||
view.update(&mut cx, |_, cx| {
|
||||
dbg!("image future loaded");
|
||||
cx.notify();
|
||||
})
|
||||
.ok();
|
||||
|
|
|
@ -131,6 +131,8 @@ impl MetalRenderer {
|
|||
}
|
||||
|
||||
pub fn draw(&mut self, scene: &mut Scene) {
|
||||
dbg!("draw scene");
|
||||
|
||||
let layer = self.layer.clone();
|
||||
let viewport_size = layer.drawable_size();
|
||||
let viewport_size: Size<DevicePixels> = size(
|
||||
|
|
|
@ -109,7 +109,6 @@ impl<'a, 'w> WindowContext<'a, 'w> {
|
|||
}
|
||||
|
||||
pub fn notify(&mut self) {
|
||||
dbg!("ViewContext::notify");
|
||||
self.window.dirty = true;
|
||||
}
|
||||
|
||||
|
@ -598,7 +597,6 @@ impl<'a, 'w, S: Send + Sync + 'static> ViewContext<'a, 'w, S> {
|
|||
}
|
||||
|
||||
pub fn notify(&mut self) {
|
||||
dbg!("ViewContext::notify");
|
||||
self.window_cx.notify();
|
||||
self.window_cx
|
||||
.app
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue