Memory devices
Improve graphics performance with off-screen rendering and caching
- Reduce flickering for smoother display updates
- Speed up rendering with cached graphics
- Scale and rotate images efficiently
Overview
Memory devices store pre-rendered graphics in memory, allowing windows and images to be displayed without repeated rendering. This improves drawing performance, reduces flickering, and enables graphics to be modified before they appear on the display.
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.
Window caching can be enabled for all windows with a single line of code or configured 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
Memory devices help minimize flickering, even on systems with limited RAM. They allow drawing operations to be performed off-screen before the completed image is displayed.
This is particularly useful when updating complex graphics or text, where individual drawing operations might otherwise become visible. If there is insufficient memory to buffer an entire window, emWin automatically uses banding to process and display the content in smaller sections.