diff options
| author | Martin Haug <mhaug@live.de> | 2021-06-27 12:28:40 +0200 |
|---|---|---|
| committer | Martin Haug <mhaug@live.de> | 2021-06-27 12:31:27 +0200 |
| commit | 6b6cdae7ce95681d6a1194be70b375494166a8c6 (patch) | |
| tree | 2fe370798919ee0d1d411c6cacc5518a76094ecd /src/layout/mod.rs | |
| parent | f64c772b6d969fa3aa1a7391a3d8118b21430434 (diff) | |
Testing for incremental
Also, constraint bugfixes.
Diffstat (limited to 'src/layout/mod.rs')
| -rw-r--r-- | src/layout/mod.rs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 10c30f41..dc819a16 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -102,18 +102,10 @@ impl Layout for AnyNode { regions: &Regions, ) -> Vec<Constrained<Rc<Frame>>> { ctx.level += 1; - let frames = ctx - .cache - .layout - .frames - .get(&self.hash) - .and_then(|x| x.check(regions.clone())) - .unwrap_or_else(|| { + let frames = + ctx.cache.layout.get(self.hash, regions.clone()).unwrap_or_else(|| { let frames = self.node.layout(ctx, regions); - ctx.cache.layout.frames.insert(self.hash, FramesEntry { - frames: frames.clone(), - level: ctx.level - 1, - }); + ctx.cache.layout.insert(self.hash, frames.clone(), ctx.level - 1); frames }); ctx.level -= 1; |
