Memory devices
Memory devices can be used as storage for enhancing the performance when drawing image files.
Overview
Memory devices serve as storage for images to enable windows to be redrawn without re-rendering. This can prevent flickering and be useful to modify or measure a drawing before displaying it.
Window Caching
With the emWin window cache feature, the content of each window or widget is automatically cached into spare memory. When a window – or part of a window – needs to be redrawn, its content is taken from the cache, thereby avoiding the time-consuming process of re-rendering.
The feature is very easy to configure and use, requiring only one line of code to enable use on all windows. All windows can be cached, or caching can be enabled for selected windows only.
This makes emWin ideal not only for small microcontroller devices, but also for systems with high-resolution displays and sufficient RAM.
Image Container
Memory devices can be used to increase the performance of drawing image files. Images like JPEG, PNG, GIF need not be decoded during the process of drawing. It is the decoding that requires the most CPU load and that can lead to slower performance. Using a memory device as an image container enables the drawing of such images with the best possible performance.
Scaling and Rotating Images
Rotating and scaling images can be achieved with MemoryDevice functions. There are numerous functions, each optimized for its specific requirement, such as fast performance, highest quality or management of large areas of transparency.
Prevent Flickering
Systems with very little memory can use memory devices to minimize flickering. If not enough RAM is available for a display driver cache (driver with indirect interface) or for multiple buffering (direct interface), memory devices can be used to reduce flickering. When displaying a changing text above a bitmap the text might appear to flicker since each time the text gets updated the bitmap gets drawn first and the text afterwards. To prevent this flickering, all drawing operations can be done in a memory device. Once all operations are finished the memory device is displayed. If not enough memory for a complete window is available, 'Banding' will be used automatically.