Skip to main content

Crate ferroui_skia

Crate ferroui_skia 

Source
Expand description

The Skia rendering backend.

Implements the render contracts of ferroui_base::platform on top of Skia: geometries, bitmaps, regions, the drawing context and the render targets (software framebuffers and GPU surfaces).

GPU rendering goes through the gpu::ISkiaGpu abstraction. The Metal implementation (gpu::metal::SkiaMetalGpu, Apple platforms) runs on Skia’s Graphite backend, the OpenGL one (gpu::open_gl::GlSkiaGpu, the browser) on Ganesh.

Modules§

gpu
The GPU abstraction of the backend.
helpers
Helpers shared by the backend’s types.
metal
The Metal platform contracts: what a platform exposes so that a render backend can draw with Metal.
skia_sharp_extensions
Conversions between the framework’s primitives and Skia’s.

Structs§

CombinedGeometryImpl
A Skia implementation of a combined geometry.
CreateInfo
Context create info.
DrawingContextImpl
Skia based drawing context.
EllipseGeometryImpl
A Skia implementation of an ellipse geometry.
FontManagerImpl
The Skia font manager: system fonts through Skia’s default font manager.
FramebufferRenderTarget
Skia render target that renders to a framebuffer surface. No GPU acceleration available.
GeometryGroupImpl
A Skia implementation of a geometry group.
GeometryImplBase
State every geometry kind has: the stroke cache, the path measure and a handle to the geometry itself.
GlyphRunImpl
The Skia implementation of a glyph run: glyph indices and positions that are turned into text blobs for drawing.
ImmutableBitmap
Immutable Skia bitmap.
LineGeometryImpl
A Skia implementation of a line geometry.
LockedFramebuffer
A locked framebuffer described by plain values, with an optional action that runs when it is unlocked.
PictureRenderTarget
A render target that records the drawing into a Skia picture.
PlatformRenderInterface
Skia platform render interface.
RectangleGeometryImpl
A Skia implementation of a rectangle geometry.
RenderTargetBitmapImpl
A render target bitmap: a writeable bitmap that is drawn into through a framebuffer render target over its own pixels.
SimpleGeometryImpl
A Skia geometry defined by stroke and fill paths.
SkCacheBase
Cache base for Skia objects.
SkPaintCache
Cache of paints that can be shared.
SkRoundRectCache
Cache of rounded rectangles that can be shared.
SkTextBlobBuilderCache
Cache of text blob builders that can be shared.
SkiaContext
The Skia render backend bound to a GPU (or to software rendering).
SkiaOptions
Options for the Skia rendering subsystem.
SkiaPlatform
Skia platform initializer.
SkiaRegionImpl
A Skia implementation of a platform region.
SkiaTypeface
A platform typeface over a Skia typeface.
StreamGeometryBuilder
Builds a Skia geometry from drawing commands.
SurfaceRenderTarget
Skia render target that writes to a surface.
SurfaceRenderTargetCreateInfo
Create info of a SurfaceRenderTarget.
TextRenderingOverride
A development override of the text rendering of the backend (see the module): each value that is set replaces the one the surface would have.
TextRenderingSettings
The text rendering of a surface.
TextRenderingSource
Where a render target reads the text rendering parameters of the platform from: the surfaces of the top-level it renders, asked every frame.
TransformedGeometryImpl
A Skia implementation of a transformed geometry.
TwoLevelCache
Provides a lightweight two-level cache for storing key-value pairs, supporting fast retrieval and optional eviction handling.
WriteableBitmapImpl
Skia based writeable bitmap.

Enums§

CanvasSource
What a drawing context draws to.

Constants§

GREYSCALE_TEXT_SCALING
From this render scaling on, text is antialiased in greyscale by default: the pixels are small enough that subpixel antialiasing gains nothing visible, and its colour fringes remain (Chromium and the platforms switch to greyscale on high density displays as well).
TEXT_OVERRIDE_ENV_PREFIX
The prefix of the environment variables of the override.
TEXT_OVERRIDE_KEYS
The keys of the override, in the names of its environment variables (FERROUI_TEXT_<KEY>, upper case) and of a calibration specification (contrast=1,gamma=1.8).

Traits§

GeometryImpl
A geometry of this backend: something with a stroke path and a fill path.
IDrawableBitmapImpl
Extended bitmap implementation that allows for drawing its contents.
ISkiaApiLease
A lease of the Skia objects of a drawing context.
ISkiaApiLeaseFeature
Gives direct access to the Skia objects a drawing context draws with.
ISkiaPlatformGraphicsApiLease
A lease of the platform graphics API underneath Skia.
SkiaApplicationExtensions
Skia application extensions.

Functions§

set_text_rendering_override
Replaces the override of the process (a calibration aid, not a supported API): it shows from the next frame, render target bitmap or layer that is created.
startup_text_rendering_override
The override of the environment of the process, read once.
text_rendering_override
The override the surfaces of the backend apply now: the one of the environment unless a calibration host replaced it.
try_get_drawable_bitmap
Recovers the drawable bitmap behind a platform bitmap.
try_get_geometry_impl
Recovers the backend geometry behind a platform geometry.