RenderingBackend Class

A rasterizer plugged into the browsing contexts (BrowsingContextOptions.RenderingBackend): it turns the painting of the documents into pixels, decodes the images and draws the bitmaps of the canvases. The library never draws pixels by itself: it computes the layout, the fonts and the text shaping, and paints the documents into a display list (the drawing operations of the boxes and of the texts, in the painting order of CSS), which the backend rasterizes. The backend only rasterizes: the glyphs it draws come from the same font files as the ones the layout measured, at the positions computed by the library.

public abstract class RenderingBackend

Remarks

Without a backend (the default), nothing is painted: the geometry of the documents (the layout, the CSSOM View, the hit testing) is computed as usual, but no pixel is produced, and the APIs that need pixels behave as in a user agent that does not support them (e.g. canvas.getContext('2d') returns null).

The backends are the packages of this repository (Meziantou.Framework.WebPlatform.Imaging): the display list and the services a backend implements are internal to the library and change with it, so a backend depends on the exact version of the core library, and the type cannot be derived from outside of them.

A backend can be shared by several browsing contexts. Its services are called on the thread of the event loop of the browsing context that uses them (the workers use it on their own threads), so an implementation must be thread-safe.