Checkpoint
This commit is contained in:
parent
3b27d41c72
commit
d3916b84c9
4 changed files with 12 additions and 16 deletions
|
@ -251,15 +251,11 @@ impl<'a, 'w> WindowContext<'a, 'w> {
|
|||
let (root_layout_id, mut frame_state) = root_view.layout(&mut (), cx)?;
|
||||
let available_space = cx.window.content_size.map(Into::into);
|
||||
|
||||
dbg!("computing layout");
|
||||
cx.window
|
||||
.layout_engine
|
||||
.compute_layout(root_layout_id, available_space)?;
|
||||
dbg!("asking for layout");
|
||||
let layout = cx.window.layout_engine.layout(root_layout_id)?;
|
||||
|
||||
dbg!("painting root view");
|
||||
|
||||
root_view.paint(layout, &mut (), &mut frame_state, cx)?;
|
||||
cx.window.root_view = Some(root_view);
|
||||
let scene = cx.window.scene.take();
|
||||
|
@ -277,13 +273,6 @@ impl<'a, 'w> WindowContext<'a, 'w> {
|
|||
}
|
||||
}
|
||||
|
||||
impl MainThread<WindowContext<'_, '_>> {
|
||||
// todo!("implement other methods that use platform window")
|
||||
fn platform_window(&self) -> &dyn PlatformWindow {
|
||||
self.window.platform_window.borrow_on_main_thread().as_ref()
|
||||
}
|
||||
}
|
||||
|
||||
impl Context for WindowContext<'_, '_> {
|
||||
type EntityContext<'a, 'w, T: 'static + Send + Sync> = ViewContext<'a, 'w, T>;
|
||||
type Result<T> = T;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue