OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 ~FontFallbackList() { releaseFontData(); } | 45 ~FontFallbackList() { releaseFontData(); } |
46 void invalidate(PassRefPtr<FontSelector>); | 46 void invalidate(PassRefPtr<FontSelector>); |
47 | 47 |
48 bool isFixedPitch(const Font* f) const { if (m_pitch == UnknownPitch) determ
inePitch(f); return m_pitch == FixedPitch; }; | 48 bool isFixedPitch(const Font* f) const { if (m_pitch == UnknownPitch) determ
inePitch(f); return m_pitch == FixedPitch; }; |
49 void determinePitch(const Font*) const; | 49 void determinePitch(const Font*) const; |
50 | 50 |
51 bool loadingCustomFonts() const { return m_loadingCustomFonts; } | 51 bool loadingCustomFonts() const { return m_loadingCustomFonts; } |
52 | 52 |
53 FontSelector* fontSelector() const { return m_fontSelector.get(); } | 53 FontSelector* fontSelector() const { return m_fontSelector.get(); } |
| 54 // FIXME: It should be possible to combine fontSelectorVersion and generatio
n. |
| 55 unsigned fontSelectorVersion() const { return m_fontSelectorVersion; } |
54 unsigned generation() const { return m_generation; } | 56 unsigned generation() const { return m_generation; } |
55 | 57 |
56 struct GlyphPagesHashTraits : HashTraits<int> { | 58 struct GlyphPagesHashTraits : HashTraits<int> { |
57 static const int minimumTableSize = 16; | 59 static const int minimumTableSize = 16; |
58 }; | 60 }; |
59 typedef HashMap<int, GlyphPageTreeNode*, DefaultHash<int>::Hash, GlyphPagesH
ashTraits> GlyphPages; | 61 typedef HashMap<int, GlyphPageTreeNode*, DefaultHash<int>::Hash, GlyphPagesH
ashTraits> GlyphPages; |
60 GlyphPageTreeNode* glyphPageZero() const { return m_pageZero; } | 62 GlyphPageTreeNode* glyphPageZero() const { return m_pageZero; } |
61 const GlyphPages& glyphPages() const { return m_pages; } | 63 const GlyphPages& glyphPages() const { return m_pages; } |
62 | 64 |
63 private: | 65 private: |
(...skipping 16 matching lines...) Expand all Loading... |
80 | 82 |
81 void setPlatformFont(const FontPlatformData&); | 83 void setPlatformFont(const FontPlatformData&); |
82 | 84 |
83 void releaseFontData(); | 85 void releaseFontData(); |
84 | 86 |
85 mutable Vector<pair<const FontData*, bool>, 1> m_fontList; | 87 mutable Vector<pair<const FontData*, bool>, 1> m_fontList; |
86 mutable GlyphPages m_pages; | 88 mutable GlyphPages m_pages; |
87 mutable GlyphPageTreeNode* m_pageZero; | 89 mutable GlyphPageTreeNode* m_pageZero; |
88 mutable const SimpleFontData* m_cachedPrimarySimpleFontData; | 90 mutable const SimpleFontData* m_cachedPrimarySimpleFontData; |
89 RefPtr<FontSelector> m_fontSelector; | 91 RefPtr<FontSelector> m_fontSelector; |
| 92 unsigned m_fontSelectorVersion; |
90 mutable int m_familyIndex; | 93 mutable int m_familyIndex; |
91 unsigned short m_generation; | 94 unsigned short m_generation; |
92 mutable unsigned m_pitch : 3; // Pitch | 95 mutable unsigned m_pitch : 3; // Pitch |
93 mutable bool m_loadingCustomFonts : 1; | 96 mutable bool m_loadingCustomFonts : 1; |
94 | 97 |
95 friend class Font; | 98 friend class Font; |
96 }; | 99 }; |
97 | 100 |
98 } | 101 } |
99 | 102 |
100 #endif | 103 #endif |
OLD | NEW |