![]() | Embedded software consultancy specializing in ARM Powered systems | Home | Site Map | Clients | Contact |
Optimization Case Studies | |||
| |||
Fonts & GraphicsA GPS product design was being adversely affected by screen redraw time. The product designers were using a graphics library supplied by the chip manufacturer, and their software engineers were fully loaded with the coding for the complex GPS calculations and a unique function-rich user interface and application code. CodeSprite worked with the GPS engineers to free them up to concentrate on their product-differentiating code. First we specified new bitmap font functionality - the top level API was a function to print a string of characters at any pixel-point on the screen, in any size font for which bitmaps were available in the system, with a given font color and background color. The lowest-level function was a complete departure from the example code supplied by the chip manufacturer. Instead of calling a pixel-plotting function, it built as many pixels as possible into a register, then used masking and rotating to write them onto the screen with a minimum of memory accesses. The overall effect was a more flexible interface for the application developers, and a sixty times speedup over the original code, which was hardwired to a fixed 8x8 pixel bitmapped font. All the other graphics routines in the chip manufacturer's library were similarly replaced, with an emphasis on making the application programmer's job easier, as well as improving drawing speed. Line drawing was improved, Circle drawing was converted to an algorithm that didn't require sine & cosine lookups - reducing ROM space usage as well as giving a sixteen times speedup. New functions were written that would not have been practical with the getpixel-setpixel approach, such as a function that would render a drop-shadow for a pop-up menu. This project was an excellent example of how client and CodeSprite engineers can work together, the client engineers gaining more time to focus on the software that sells the product and CodeSprite giving them a solid foundation for the application tailored to their requirements. |