Commit d6fa07c3 authored by rjw's avatar rjw
Browse files

Added optimizations for text rendering.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8dfbf886
2002-05-08 Richard J. Williamson <rjw@apple.com>
Added optimizations for text rendering.
* WebCoreSupport.subproj/IFTextRenderer.h:
* WebCoreSupport.subproj/IFTextRenderer.m:
(freeWidthMap):
(freeGlyphMap):
(glyphForCharacter):
(widthForGlyph):
(widthForCharacter):
(-[IFTextRenderer substituteFontForCharacters:length:]):
(-[IFTextRenderer convertCharacters:length:glyphs:]):
(-[IFTextRenderer dealloc]):
(-[IFTextRenderer drawString:atPoint:withColor:]):
(-[IFTextRenderer drawUnderlineForString:atPoint:withColor:]):
(-[IFTextRenderer widthForCharacters:length:]):
(-[IFTextRenderer extendCharacterToGlyphMapToInclude:]):
(-[IFTextRenderer extendGlyphToWidthMapToInclude:]):
2002-05-08 Darin Adler <darin@apple.com>
* Misc.subproj/IFCache.h: Add more JavaScript object statistics.
......
2002-05-08 Richard J. Williamson <rjw@apple.com>
Added optimizations for text rendering.
* WebCoreSupport.subproj/IFTextRenderer.h:
* WebCoreSupport.subproj/IFTextRenderer.m:
(freeWidthMap):
(freeGlyphMap):
(glyphForCharacter):
(widthForGlyph):
(widthForCharacter):
(-[IFTextRenderer substituteFontForCharacters:length:]):
(-[IFTextRenderer convertCharacters:length:glyphs:]):
(-[IFTextRenderer dealloc]):
(-[IFTextRenderer drawString:atPoint:withColor:]):
(-[IFTextRenderer drawUnderlineForString:atPoint:withColor:]):
(-[IFTextRenderer widthForCharacters:length:]):
(-[IFTextRenderer extendCharacterToGlyphMapToInclude:]):
(-[IFTextRenderer extendGlyphToWidthMapToInclude:]):
2002-05-08 Darin Adler <darin@apple.com>
* Misc.subproj/IFCache.h: Add more JavaScript object statistics.
......
......@@ -11,24 +11,42 @@
typedef float IFGlyphWidth;
typedef struct _WidthMap {
ATSGlyphRef startRange;
ATSGlyphRef endRange;
struct _WidthMap *next;
IFGlyphWidth *widths;
} WidthMap;
typedef struct _GlyphMap {
UniChar startRange;
UniChar endRange;
struct _GlyphMap *next;
ATSGlyphRef *glyphs;
} GlyphMap;
@interface IFTextRenderer : NSObject <WebCoreTextRenderer>
{
@public
NSFont *font;
int ascent;
int descent;
int lineSpacing;
ATSStyleGroupPtr styleGroup;
ATSGlyphVector glyphVector;
unsigned int widthCacheSize;
IFGlyphWidth *widthCache;
ATSGlyphRef *characterToGlyph;
GlyphMap *characterToGlyphMap;
WidthMap *glyphToWidthMap;
NSArray *substituteFontRenderers;
}
- initWithFont:(NSFont *)font;
- (NSFont *)convertCharacters: (const unichar *)characters length: (int)numCharacters glyphs: (ATSGlyphVector *)glyphs;
- (void)convertCharacters: (const unichar *)characters length: (int)numCharacters glyphs: (ATSGlyphVector *)glyphs;
- (ATSGlyphRef)extendCharacterToGlyphMapToInclude:(UniChar) c;
- (WidthMap *)extendGlyphToWidthMapToInclude:(ATSGlyphRef)glyphID;
@end
......@@ -11,24 +11,42 @@
typedef float IFGlyphWidth;
typedef struct _WidthMap {
ATSGlyphRef startRange;
ATSGlyphRef endRange;
struct _WidthMap *next;
IFGlyphWidth *widths;
} WidthMap;
typedef struct _GlyphMap {
UniChar startRange;
UniChar endRange;
struct _GlyphMap *next;
ATSGlyphRef *glyphs;
} GlyphMap;
@interface IFTextRenderer : NSObject <WebCoreTextRenderer>
{
@public
NSFont *font;
int ascent;
int descent;
int lineSpacing;
ATSStyleGroupPtr styleGroup;
ATSGlyphVector glyphVector;
unsigned int widthCacheSize;
IFGlyphWidth *widthCache;
ATSGlyphRef *characterToGlyph;
GlyphMap *characterToGlyphMap;
WidthMap *glyphToWidthMap;
NSArray *substituteFontRenderers;
}
- initWithFont:(NSFont *)font;
- (NSFont *)convertCharacters: (const unichar *)characters length: (int)numCharacters glyphs: (ATSGlyphVector *)glyphs;
- (void)convertCharacters: (const unichar *)characters length: (int)numCharacters glyphs: (ATSGlyphVector *)glyphs;
- (ATSGlyphRef)extendCharacterToGlyphMapToInclude:(UniChar) c;
- (WidthMap *)extendGlyphToWidthMapToInclude:(ATSGlyphRef)glyphID;
@end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment