Expand description
Functions to manage adding fonts + images, garbage collection
Structs§
- Stores the resources for the application, souch as fonts, images and cached texts, also clipboard strings
- Info about what cluster a certain glyph belongs to.
- Iterator over glyphs that returns information about the cluster that this glyph belongs to. Returned by the
ScaledWord::cluster_iter()
function. - Descriptor for external image resources. See
ImageData
. - An arbitrary identifier for an external image provided by the application. It must be a unique identifier for each external image.
- Used only for debugging, so that the AppResource garbage collection tests can run without a real RenderApi
- Metadata (but not storage) describing an image In WebRender.
- Various flags that are part of an image descriptor.
- Returns the layouted glyph instances
- Raw image made up of raw pixels (either BRGA8 or A8)
- Word that is scaled (to a font / font instance), but not yet positioned
- A paragraph of words that are shaped and scaled (* but not yet layouted / positioned*!) according to their final size in pixels.
- Cache for accessing large amounts of text
- Section of a certain type
- Stores the positions of the vertically laid out texts
- Text broken up into
Tab
,Word()
,Return
characters
Enums§
- Storage format identifier for externally-managed images.
- Represents the backing store of an arbitrary series of pixels for display by WebRender. This storage can take several forms.
- Specifies the type of texture target in driver terms.
- Either a white-space delimited word, tab or return character
Constants§
Traits§
Functions§
- Scans the DisplayList for new images and fonts. After this call, the RenderApi is guaranteed to know about all FontKeys and FontInstanceKey
- Submits the
AddFont
,AddFontInstance
andAddImage
resources to the RenderApi. Extendscurrently_registered_images
andcurrently_registered_fonts
by thelast_frame_image_keys
andlast_frame_font_keys
, so that we don’t lose track of what font and image keys are currently in the API. - Given the fonts of the current frame, returns
AddFont
andAddFontInstance
s of which fonts / instances are currently not in thecurrent_registered_fonts
and need to be added. - Given the images of the current frame, returns
AddImage
s of which image keys are currently not in thecurrent_registered_fonts
and need to be added. Modifieslast_frame_image_keys
to contain the added image keys - At the end of the frame, all images that are registered, but weren’t used in the last frame
- To be called at the end of a frame (after the UI has rendered): Deletes all FontKeys and FontImageKeys that weren’t used in the last frame, to save on memory. If the font needs to be recreated, it needs to be reloaded from the
FontSource
. - Scans the display list for all font IDs + their font size
- Scans the display list for all image keys