Cache width and xposition in get_font_metrics
commit2e906fb8d41d4b908c15c8986cd55357c76c2de5
authorThomas Perl <thp@perli.net>
Thu, 8 Jan 2009 18:32:47 +0000 (8 19:32 +0100)
committerThomas Perl <thp@perli.net>
Tue, 27 Jan 2009 11:37:37 +0000 (27 12:37 +0100)
treeb0d6534d3c7fe70ba74fb08ac46886d3eac070cd
parentfb8201d8000c5d4f5457d6fdd42443252fa188c2
Cache width and xposition in get_font_metrics

To save some cycles, do not re-calculate the font
metrics every time a string is drawn, but save the
width and xposition permanently after the first
calculation to speed up font drawing.
graphics.c
graphics.h