This article describes how to configure various runtime features of the TouchGFX framework. The configuration allows the TouchGFX programmer to selectively include various features in his application. Including a feature will increase the size of the application, and not including it will reduce the size.
In TouchGFX 4.13 only the Texture Mapper functionality is configurable, but it is anticipated that more features will be configurable in later versions.
The Texture Mappers are software algorithms that are used by the TextureMapper, AnalogClock, AnimatedTextureMapper, ScalableImage, and ZoomAnimationImage widgets to do the actual drawing of bitmap content in the FrameBuffer.
TouchGFX contains many Texture Mapper algorithms to draw many different bitmap formats in the different supported frame buffer formats. When they are all enabled for an application they will increase the application code size. If they are not enabled, the application will be smaller. But if an application uses a Texture Mapper algorithm that is not enabled, then nothing is drawn in the frame buffer by the Widget.
This means that an application should enable all used Texture Mapper algorithms. If code size reduction is not a high priority, then it is recommended to enable all Texture Mappers.
All Texture Mappers enabled by the Designer
The TouchGFX Designer will enable all the Texture Mappers by default. This way all applications will continue to work (meaning that all Widgets will draw in the frame buffer).
You can easily disable some of the Texture Mappers in the TouchGFX Designer. Click the Config tab in the top bar, then select Framework Features in the left panel:
Here you can select or deselect the Texture Mapper algorithms and include the algorithms you require for your application. For example, if you do not use L8 images in your application, there is not reason to include the L8 Texture Mapper algorithms.
Enable Texture Mappers in code
If you do not use the Designer for your application then you must enable the Texture Mappers you use in your source code. Otherwise no Texture Mappers are enabled.
You enable Texture Mappers by calling the relevant "enableTextureMapperXXX()" function on the LCD driver you use. For example to enable all Texture Mappers on LCD16bpp, you can insert this line in your application:
LCD16bpp display; ... display.enableTextureMapperAll();
Here is a list of the enableTextureMapper functions available for LCD16bpp:
enableTextureMapperAll() enableTextureMapperL8_RGB565() enableTextureMapperL8_RGB565_BilinearInterpolation() enableTextureMapperL8_RGB565_NearestNeighbor() enableTextureMapperL8_RGB888() enableTextureMapperL8_RGB888_BilinearInterpolation() enableTextureMapperL8_RGB888_NearestNeighbor() enableTextureMapperL8_ARGB8888() enableTextureMapperL8_ARGB8888_BilinearInterpolation() enableTextureMapperL8_ARGB8888_NearestNeighbor() enableTextureMapperRGB565() enableTextureMapperRGB565_Opaque_BilinearInterpolation() enableTextureMapperRGB565_NonOpaque_BilinearInterpolation() enableTextureMapperRGB565_Opaque_NearestNeighbor() enableTextureMapperRGB565_NonOpaque_NearestNeighbor() enableTextureMapperARGB8888() enableTextureMapperARGB8888_BilinearInterpolation() enableTextureMapperARGB8888_NearestNeighbor() enableTextureMapperA4() enableTextureMapperA4_BilinearInterpolation() enableTextureMapperA4_NearestNeighbor()
Check the relevant header file for the LCD class you use to see the list.