summaryrefslogtreecommitdiff
path: root/src/layout
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-01-24 16:48:24 +0100
committerLaurenz <laurmaedje@gmail.com>2022-01-24 17:39:49 +0100
commit3739ab77207e0e54edb55a110a16a1eb925b84f4 (patch)
tree06c8e5987d2fe070ad273ef94641161bbaef7095 /src/layout
parentdb158719d67fdef1d2c76300fb232cf2d4bfb35d (diff)
Export into rendered images
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs
index d563dafb..e4c29f9b 100644
--- a/src/layout/mod.rs
+++ b/src/layout/mod.rs
@@ -79,7 +79,7 @@ pub struct LayoutContext<'a> {
pub images: &'a mut ImageStore,
/// Caches layouting artifacts.
#[cfg(feature = "layout-cache")]
- pub layouts: &'a mut LayoutCache,
+ pub layout_cache: &'a mut LayoutCache,
/// How deeply nested the current layout tree position is.
#[cfg(feature = "layout-cache")]
level: usize,
@@ -92,7 +92,7 @@ impl<'a> LayoutContext<'a> {
fonts: &mut ctx.fonts,
images: &mut ctx.images,
#[cfg(feature = "layout-cache")]
- layouts: &mut ctx.layouts,
+ layout_cache: &mut ctx.layout_cache,
#[cfg(feature = "layout-cache")]
level: 0,
};
@@ -220,7 +220,7 @@ impl Layout for PackedNode {
};
#[cfg(feature = "layout-cache")]
- ctx.layouts.get(hash, regions).unwrap_or_else(|| {
+ ctx.layout_cache.get(hash, regions).unwrap_or_else(|| {
ctx.level += 1;
let frames = self.node.layout(ctx, regions, styles);
ctx.level -= 1;
@@ -238,7 +238,7 @@ impl Layout for PackedNode {
panic!("constraints did not match regions they were created for");
}
- ctx.layouts.insert(hash, entry);
+ ctx.layout_cache.insert(hash, entry);
frames
})
}