pub struct GlTextureCache {
pub solved_textures: BTreeMap<DomId, BTreeMap<NodeId, (ImageKey, ImageDescriptor, ExternalImageId)>>,
pub hashes: BTreeMap<(DomId, NodeId, ImageRefHash), ImageRefHash>,
}Fields§
§solved_textures: BTreeMap<DomId, BTreeMap<NodeId, (ImageKey, ImageDescriptor, ExternalImageId)>>§hashes: BTreeMap<(DomId, NodeId, ImageRefHash), ImageRefHash>Implementations§
Source§impl GlTextureCache
impl GlTextureCache
Sourcepub fn new(
layout_results: &mut [LayoutResult],
gl_context: &OptionGlContextPtr,
id_namespace: IdNamespace,
document_id: &DocumentId,
epoch: Epoch,
hidpi_factor: f32,
image_cache: &ImageCache,
system_fonts: &FcFontCache,
callbacks: &RenderCallbacks,
all_resource_updates: &mut Vec<ResourceUpdate>,
renderer_resources: &mut RendererResources,
) -> Self
pub fn new( layout_results: &mut [LayoutResult], gl_context: &OptionGlContextPtr, id_namespace: IdNamespace, document_id: &DocumentId, epoch: Epoch, hidpi_factor: f32, image_cache: &ImageCache, system_fonts: &FcFontCache, callbacks: &RenderCallbacks, all_resource_updates: &mut Vec<ResourceUpdate>, renderer_resources: &mut RendererResources, ) -> Self
Invokes all ImageCallbacks with the sizes given by the LayoutResult
and adds them to the RendererResources.
Sourcepub fn update_texture(
&mut self,
dom_id: DomId,
node_id: NodeId,
document_id: DocumentId,
epoch: Epoch,
new_texture: Texture,
callbacks: &RenderCallbacks,
) -> Option<ExternalImageId>
pub fn update_texture( &mut self, dom_id: DomId, node_id: NodeId, document_id: DocumentId, epoch: Epoch, new_texture: Texture, callbacks: &RenderCallbacks, ) -> Option<ExternalImageId>
Updates a given texture
Trait Implementations§
Source§impl Debug for GlTextureCache
impl Debug for GlTextureCache
Source§impl Default for GlTextureCache
impl Default for GlTextureCache
Source§fn default() -> GlTextureCache
fn default() -> GlTextureCache
Returns the “default value” for a type. Read more
impl Send for GlTextureCache
Auto Trait Implementations§
impl Freeze for GlTextureCache
impl RefUnwindSafe for GlTextureCache
impl Sync for GlTextureCache
impl Unpin for GlTextureCache
impl UnwindSafe for GlTextureCache
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more