| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 using namespace WTF; | 46 using namespace WTF; |
| 47 | 47 |
| 48 namespace WebCore { | 48 namespace WebCore { |
| 49 | 49 |
| 50 FontCache* fontCache() | 50 FontCache* fontCache() |
| 51 { | 51 { |
| 52 DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ()); | 52 DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ()); |
| 53 return &globalFontCache; | 53 return &globalFontCache; |
| 54 } | 54 } |
| 55 | 55 |
| 56 #if !OS(WINDOWS) || ENABLE(GDI_FONTS_ON_WINDOWS) |
| 56 FontCache::FontCache() | 57 FontCache::FontCache() |
| 57 : m_purgePreventCount(0) | 58 : m_purgePreventCount(0) |
| 58 { | 59 { |
| 59 } | 60 } |
| 60 | 61 |
| 62 FontCache::~FontCache() |
| 63 { |
| 64 } |
| 65 #endif // !OS(WINDOWS) || ENABLE(GDI_FONTS_ON_WINDOWS) |
| 66 |
| 61 struct FontPlatformDataCacheKey { | 67 struct FontPlatformDataCacheKey { |
| 62 WTF_MAKE_FAST_ALLOCATED; | 68 WTF_MAKE_FAST_ALLOCATED; |
| 63 public: | 69 public: |
| 64 FontPlatformDataCacheKey(const AtomicString& family = AtomicString(), unsign
ed size = 0, unsigned weight = 0, bool italic = false, | 70 FontPlatformDataCacheKey(const AtomicString& family = AtomicString(), unsign
ed size = 0, unsigned weight = 0, bool italic = false, |
| 65 bool isPrinterFont = false, FontOrientation orientation = Horizontal, Fo
ntWidthVariant widthVariant = RegularWidth) | 71 bool isPrinterFont = false, FontOrientation orientation = Horizontal, Fo
ntWidthVariant widthVariant = RegularWidth) |
| 66 : m_size(size) | 72 : m_size(size) |
| 67 , m_weight(weight) | 73 , m_weight(weight) |
| 68 , m_family(family) | 74 , m_family(family) |
| 69 , m_italic(italic) | 75 , m_italic(italic) |
| 70 , m_printerFont(isPrinterFont) | 76 , m_printerFont(isPrinterFont) |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 case FontDescription::SansSerifFamily: | 583 case FontDescription::SansSerifFamily: |
| 578 default: | 584 default: |
| 579 fontPlatformData = getFontResourcePlatformData(description, sansStr); | 585 fontPlatformData = getFontResourcePlatformData(description, sansStr); |
| 580 break; | 586 break; |
| 581 } | 587 } |
| 582 | 588 |
| 583 return fontPlatformData; | 589 return fontPlatformData; |
| 584 } | 590 } |
| 585 | 591 |
| 586 } // namespace WebCore | 592 } // namespace WebCore |
| OLD | NEW |