mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 00:50:49 +00:00
Tweak glyph caching parameters to increase performance.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16330 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
99a69e9446
commit
619c1f0b45
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2003-04-02 15:26 Alexander Malmberg <alexander@malmberg.org>
|
||||||
|
|
||||||
|
* Source/GSHorizontalTypesetter.m: Tweak glyph caching parameters
|
||||||
|
to increase performance.
|
||||||
|
|
||||||
2003-04-01 Willem Rein Oudshoorn <woudshoo@xs4all.nl>
|
2003-04-01 Willem Rein Oudshoorn <woudshoo@xs4all.nl>
|
||||||
|
|
||||||
* Source/NSMenuView.m (NSMenuWindowTitleView): reformatted one line to
|
* Source/NSMenuView.m (NSMenuWindowTitleView): reformatted one line to
|
||||||
|
|
|
@ -83,6 +83,10 @@ static GSHorizontalTypesetter *shared;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define CACHE_INITIAL 192
|
||||||
|
#define CACHE_STEP 192
|
||||||
|
|
||||||
|
|
||||||
typedef struct GSHorizontalTypesetter_glyph_cache_s
|
typedef struct GSHorizontalTypesetter_glyph_cache_s
|
||||||
{
|
{
|
||||||
/* These fields are filled in by the caching: */
|
/* These fields are filled in by the caching: */
|
||||||
|
@ -470,7 +474,7 @@ Return values 0, 1, 2 are mostly the same as from
|
||||||
|
|
||||||
[self _cacheMoveTo: curGlyph];
|
[self _cacheMoveTo: curGlyph];
|
||||||
if (!cache_length)
|
if (!cache_length)
|
||||||
[self _cacheGlyphs: 16];
|
[self _cacheGlyphs: CACHE_INITIAL];
|
||||||
if (!cache_length && at_end)
|
if (!cache_length && at_end)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -663,7 +667,7 @@ restart:
|
||||||
newParagraph = NO;
|
newParagraph = NO;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
[self _cacheGlyphs: cache_length + 16];
|
[self _cacheGlyphs: cache_length + CACHE_STEP];
|
||||||
if (i >= cache_length)
|
if (i >= cache_length)
|
||||||
{
|
{
|
||||||
newParagraph = NO;
|
newParagraph = NO;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue