libwebsockets/contrib/mcufont/encoder/optimize_rlefont.hh
Andy Green e3dca87f23 lws_display: add display list / DLO support
This adds optional display list support to lws_display, using DLOs (Display
List Objects).  DLOs for rectangle / rounded rectangle (with circle as the
degenerate case), PNGs, JPEG and compressed, antialiased bitmapped fonts
and text primitives are provided.

Logical DLOs are instantiated on heap and listed into an lws_display_list
owner, DLOs handle attributes like position, bounding box, colour +
opacity, and local error diffusion backing buffer.

When the display list is complete, it can be rasterized a line at a time,
with scoped error diffusion resolved, such that no allocation for the
framebuffer is required at any point.  DLOs are freed as the rasterization
moves beyond their bounding box.

Adds a platform registry binding names and other metadata to lws_display
fonts / PNGs / JPEGs.  Provides registration, destruction and best match
selection apis.
2022-03-25 08:18:29 +00:00

16 lines
420 B
C++

// This implements the actual optimization passes of the compressor.
#include "datafile.hh"
namespace mcufont {
namespace rlefont {
// Initialize the dictionary table with reasonable guesses.
void init_dictionary(DataFile &datafile);
// Perform a single optimization step, consisting itself of multiple passes
// of each of the optimization algorithms.
void optimize(DataFile &datafile, size_t iterations = 50);
}}