Draw Acceleration for Anti Aliased Text - mchpgfx/legato.docs GitHub Wiki
Draw Acceleration for Anti-Aliased Text
Introduction - Scheme Acceleration
Scheme Acceleration feature is introduced as of gfx-v3.11.x. The feature lets Schemes to generate with a look-up table of pre-calculated alpha-blended foreground and background colors. This look-up table is used to render text on Label widgets and eliminates the need for run-time alpha-blending.
This improves draw performance for anti-aliased text. It works even when alpha-blending is disabled in the library.
NOTE: As of gfx-v3.11.1, Scheme Acceleration only works for Button and Label widgets.
Setting Up
- Select a scheme to accelerate in Composer, click the Accelerate Scheme button
- In the Scheme Acceleration Table Configuration Dialog box, check Base for Background and Text for Foreground. This will tell composer to generate a LUT that has the alpha-blended values for the Text color over the Base background color.
- Use this accelerate scheme in the Label widgets and enable Background Fill.
With this feature, alpha-blending is not required in the Renderer settings for anti-aliased text. If you are using RGB565 RAW images and do not need alpha blending for your widgets, you can disable alpha blending in Composer to accelerate rendering overall.