struct GalleyCache {
generation: u32,
cache: IntMap<u64, CachedGalley>,
}
Fields§
§generation: u32
Frame counter used to do garbage collection on the cache
cache: IntMap<u64, CachedGalley>
Implementations§
Source§impl GalleyCache
impl GalleyCache
fn layout_internal( &mut self, fonts: &mut FontsImpl, job: LayoutJob, allow_split_paragraphs: bool, ) -> (u64, Arc<Galley>)
fn layout( &mut self, fonts: &mut FontsImpl, job: LayoutJob, allow_split_paragraphs: bool, ) -> Arc<Galley>
Sourcefn layout_each_paragraph_individually(
&mut self,
fonts: &mut FontsImpl,
job: &LayoutJob,
) -> (Vec<Arc<Galley>>, Vec<u64>)
fn layout_each_paragraph_individually( &mut self, fonts: &mut FontsImpl, job: &LayoutJob, ) -> (Vec<Arc<Galley>>, Vec<u64>)
Split on \n
and lay out (and cache) each paragraph individually.
pub fn num_galleys_in_cache(&self) -> usize
Sourcepub fn flush_cache(&mut self)
pub fn flush_cache(&mut self)
Must be called once per frame to clear the Galley
cache.
Trait Implementations§
Source§impl Default for GalleyCache
impl Default for GalleyCache
Source§fn default() -> GalleyCache
fn default() -> GalleyCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GalleyCache
impl RefUnwindSafe for GalleyCache
impl Send for GalleyCache
impl Sync for GalleyCache
impl Unpin for GalleyCache
impl UnwindSafe for GalleyCache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more