diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-05-27 09:36:51 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-05-27 09:36:51 +0200 |
| commit | 9950a69d23a6415cdbea08bc770f4019344318a0 (patch) | |
| tree | d7834d0fc06cb29c8b998438c74f0bcc5671f716 /src/model/layout.rs | |
| parent | 806d9f0d9ab381500318f3e106b9c20c5eabccb7 (diff) | |
Replay group and value side effects
Diffstat (limited to 'src/model/layout.rs')
| -rw-r--r-- | src/model/layout.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/model/layout.rs b/src/model/layout.rs index 49720be4..92d73977 100644 --- a/src/model/layout.rs +++ b/src/model/layout.rs @@ -221,18 +221,19 @@ impl Layout for LayoutNode { regions: &Regions, styles: StyleChain, ) -> TypResult<Vec<Arc<Frame>>> { - let (result, cursor) = crate::memo::memoized( + let (result, at, pins) = crate::memo::memoized( (self, &mut *ctx, regions, styles), |(node, ctx, regions, styles)| { + let at = ctx.pins.cursor(); let entry = StyleEntry::Barrier(Barrier::new(node.id())); let result = node.0.layout(ctx, regions, entry.chain(&styles)); - (result, ctx.pins.cursor()) + (result, at, ctx.pins.from(at)) }, ); // Replay the side effect in case of caching. This should currently be // more or less the only relevant side effect on the context. - ctx.pins.jump(cursor); + ctx.pins.replay(at, pins); result } |
