summaryrefslogtreecommitdiff
path: root/src/cache.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cache.rs')
-rw-r--r--src/cache.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cache.rs b/src/cache.rs
index aa9c10a0..2aa276aa 100644
--- a/src/cache.rs
+++ b/src/cache.rs
@@ -2,6 +2,7 @@
use crate::font::FontCache;
use crate::image::ImageCache;
+#[cfg(feature = "layout-cache")]
use crate::layout::LayoutCache;
use crate::loading::Loader;
@@ -12,6 +13,7 @@ pub struct Cache {
/// Caches decoded images.
pub image: ImageCache,
/// Caches layouting artifacts.
+ #[cfg(feature = "layout-cache")]
pub layout: LayoutCache,
}
@@ -21,6 +23,7 @@ impl Cache {
Self {
font: FontCache::new(loader),
image: ImageCache::new(),
+ #[cfg(feature = "layout-cache")]
layout: LayoutCache::new(),
}
}