Commit f248276b authored by mrowe@apple.com's avatar mrowe@apple.com

Remove code for calculating the glyph cache size.

Reviewed by Sam Weinig.

WebCore:
* WebCore.base.exp: Remove unused symbol.
* platform/graphics/mac/FontCacheMac.mm: Remove code that is unused now that we do not compute the glyph cache size.
* platform/mac/WebCoreSystemInterface.h: Remove unused symbol.
* platform/mac/WebCoreSystemInterface.mm: Ditto.

WebKit:
* WebCoreSupport/WebSystemInterface.m:
(InitWebCoreSystemInterface): Remove unused symbol.

WebKitSystemInterface:
* WebKitSystemInterface.h: Remove unused symbol.
* libWebKitSystemInterfaceLeopard.a:
* libWebKitSystemInterfaceTiger.a:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 14337367
2008-04-24 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
Remove code for calculating the glyph cache size.
* WebCore.base.exp: Remove unused symbol.
* platform/graphics/mac/FontCacheMac.mm: Remove code that is unused now that we do not compute the glyph cache size.
* platform/mac/WebCoreSystemInterface.h: Remove unused symbol.
* platform/mac/WebCoreSystemInterface.mm: Ditto.
2008-04-24 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
......@@ -841,7 +841,6 @@ _wkDrawMediaSliderThumb
_wkDrawMediaSliderTrack
_wkDrawMediaUnMuteButton
_wkDrawTextFieldCellFocusRing
_wkFontSmoothingModeIsLCD
_wkGetATSStyleGroup
_wkGetExtensionsForMIMEType
_wkGetFontInLanguageForCharacter
......
......@@ -42,84 +42,9 @@ typedef int NSInteger;
namespace WebCore {
static bool getAppDefaultValue(CFStringRef key, int *v)
{
CFPropertyListRef value;
value = CFPreferencesCopyValue(key, kCFPreferencesCurrentApplication,
kCFPreferencesAnyUser,
kCFPreferencesAnyHost);
if (value == 0) {
value = CFPreferencesCopyValue(key, kCFPreferencesCurrentApplication,
kCFPreferencesCurrentUser,
kCFPreferencesAnyHost);
if (value == 0)
return false;
}
if (CFGetTypeID(value) == CFNumberGetTypeID()) {
if (v != 0)
CFNumberGetValue((const CFNumberRef)value, kCFNumberIntType, v);
} else if (CFGetTypeID(value) == CFStringGetTypeID()) {
if (v != 0)
*v = CFStringGetIntValue((const CFStringRef)value);
} else {
CFRelease(value);
return false;
}
CFRelease(value);
return true;
}
static bool getUserDefaultValue(CFStringRef key, int *v)
{
CFPropertyListRef value;
value = CFPreferencesCopyValue(key, kCFPreferencesAnyApplication,
kCFPreferencesCurrentUser,
kCFPreferencesCurrentHost);
if (value == 0)
return false;
if (CFGetTypeID(value) == CFNumberGetTypeID()) {
if (v != 0)
CFNumberGetValue((const CFNumberRef)value, kCFNumberIntType, v);
} else if (CFGetTypeID(value) == CFStringGetTypeID()) {
if (v != 0)
*v = CFStringGetIntValue((const CFStringRef)value);
} else {
CFRelease(value);
return false;
}
CFRelease(value);
return true;
}
static int getLCDScaleParameters(void)
{
int mode;
CFStringRef key;
key = CFSTR("AppleFontSmoothing");
if (!getAppDefaultValue(key, &mode)) {
if (!getUserDefaultValue(key, &mode))
return 1;
}
if (wkFontSmoothingModeIsLCD(mode))
return 4;
return 1;
}
#define MINIMUM_GLYPH_CACHE_SIZE 1536 * 1024
void FontCache::platformInit()
{
size_t s = MINIMUM_GLYPH_CACHE_SIZE*getLCDScaleParameters();
wkSetUpFontCache(s);
wkSetUpFontCache();
}
static int toAppKitFontWeight(FontWeight fontWeight)
......
......@@ -93,7 +93,6 @@ extern void (*wkDrawTextFieldCellFocusRing)(NSTextFieldCell*, NSRect);
extern void (*wkDrawCapsLockIndicator)(CGContextRef, CGRect);
extern void (*wkDrawBezeledTextArea)(NSRect, BOOL enabled);
extern void (*wkDrawFocusRing)(CGContextRef, CGColorRef, int radius);
extern BOOL (*wkFontSmoothingModeIsLCD)(int mode);
extern OSStatus (*wkGetATSStyleGroup)(ATSUStyle, void** styleGroup);
extern CGFontRef (*wkGetCGFontFromNSFont)(NSFont*);
extern NSFont* (*wkGetFontInLanguageForRange)(NSFont*, NSString*, NSRange);
......@@ -131,7 +130,7 @@ extern void (*wkSetNSURLConnectionDefersCallbacks)(NSURLConnection *, BOOL);
extern void (*wkSetNSURLRequestShouldContentSniff)(NSMutableURLRequest *, BOOL);
extern void (*wkSetPatternBaseCTM)(CGContextRef, CGAffineTransform);
extern void (*wkSetPatternPhaseInUserSpace)(CGContextRef, CGPoint);
extern void (*wkSetUpFontCache)(size_t);
extern void (*wkSetUpFontCache)();
extern void (*wkSignalCFReadStreamEnd)(CFReadStreamRef stream);
extern void (*wkSignalCFReadStreamError)(CFReadStreamRef stream, CFStreamError *error);
extern void (*wkSignalCFReadStreamHasBytes)(CFReadStreamRef stream);
......
......@@ -36,7 +36,6 @@ void (*wkDrawTextFieldCellFocusRing)(NSTextFieldCell*, NSRect);
void (*wkDrawCapsLockIndicator)(CGContextRef, CGRect);
void (*wkDrawBezeledTextArea)(NSRect, BOOL enabled);
void (*wkDrawFocusRing)(CGContextRef, CGColorRef, int radius);
BOOL (*wkFontSmoothingModeIsLCD)(int mode);
OSStatus (*wkGetATSStyleGroup)(ATSUStyle, void** styleGroup);
NSFont* (*wkGetFontInLanguageForRange)(NSFont*, NSString*, NSRange);
NSFont* (*wkGetFontInLanguageForCharacter)(NSFont*, UniChar);
......@@ -70,7 +69,7 @@ void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
void (*wkSetDragImage)(NSImage*, NSPoint offset);
void (*wkSetPatternBaseCTM)(CGContextRef, CGAffineTransform);
void (*wkSetPatternPhaseInUserSpace)(CGContextRef, CGPoint point);
void (*wkSetUpFontCache)(size_t);
void (*wkSetUpFontCache)();
void (*wkSignalCFReadStreamEnd)(CFReadStreamRef stream);
void (*wkSignalCFReadStreamHasBytes)(CFReadStreamRef stream);
void (*wkSignalCFReadStreamError)(CFReadStreamRef stream, CFStreamError *error);
......
2008-04-24 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
Remove code for calculating the glyph cache size.
* WebCoreSupport/WebSystemInterface.m:
(InitWebCoreSystemInterface): Remove unused symbol.
2008-04-24 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
......
......@@ -58,7 +58,6 @@ void InitWebCoreSystemInterface(void)
INIT(DrawMediaSliderThumb);
INIT(DrawMediaUnMuteButton);
INIT(DrawTextFieldCellFocusRing);
INIT(FontSmoothingModeIsLCD);
INIT(GetATSStyleGroup);
INIT(GetExtensionsForMIMEType);
INIT(GetFontInLanguageForCharacter);
......
2008-04-24 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
Remove code for calculating the glyph cache size.
* WebKitSystemInterface.h: Remove unused symbol.
* libWebKitSystemInterfaceLeopard.a:
* libWebKitSystemInterfaceTiger.a:
2008-03-28 Steve Falkenburg <sfalken@apple.com>
Versioning.
......
......@@ -71,8 +71,7 @@ void WKAccessibilityHandleFocusChanged(void);
AXUIElementRef WKCreateAXUIElementRef(id element);
void WKUnregisterUniqueIdForElement(id element);
BOOL WKFontSmoothingModeIsLCD(int mode);
void WKSetUpFontCache(size_t s);
void WKSetUpFontCache(void);
void WKSignalCFReadStreamEnd(CFReadStreamRef stream);
void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
......
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