Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Side by Side Diff: Source/platform/fonts/FontFallbackList.h

Issue 1020833002: Remove duplicate Enum Font Pitch (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebasing patch Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/platform/fonts/FontDescription.h ('k') | Source/platform/fonts/FontFallbackList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public License 14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to 15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA. 17 * Boston, MA 02110-1301, USA.
18 * 18 *
19 */ 19 */
20 20
21 #ifndef FontFallbackList_h 21 #ifndef FontFallbackList_h
22 #define FontFallbackList_h 22 #define FontFallbackList_h
23 23
24 #include "platform/fonts/FixedPitchFontType.h"
24 #include "platform/fonts/FontSelector.h" 25 #include "platform/fonts/FontSelector.h"
25 #include "platform/fonts/SimpleFontData.h" 26 #include "platform/fonts/SimpleFontData.h"
26 #include "platform/fonts/WidthCache.h" 27 #include "platform/fonts/WidthCache.h"
27 #include "wtf/Forward.h" 28 #include "wtf/Forward.h"
28 #include "wtf/MainThread.h" 29 #include "wtf/MainThread.h"
29 30
30 namespace blink { 31 namespace blink {
31 32
32 class GlyphPageTreeNodeBase; 33 class GlyphPageTreeNodeBase;
33 class FontDescription; 34 class FontDescription;
(...skipping 26 matching lines...) Expand all
60 GlyphPageTreeNodeBase* m_pageZero; 61 GlyphPageTreeNodeBase* m_pageZero;
61 }; 62 };
62 63
63 static PassRefPtr<FontFallbackList> create() { return adoptRef(new FontFallb ackList()); } 64 static PassRefPtr<FontFallbackList> create() { return adoptRef(new FontFallb ackList()); }
64 65
65 ~FontFallbackList() { releaseFontData(); } 66 ~FontFallbackList() { releaseFontData(); }
66 void invalidate(PassRefPtrWillBeRawPtr<FontSelector>); 67 void invalidate(PassRefPtrWillBeRawPtr<FontSelector>);
67 68
68 bool isFixedPitch(const FontDescription& fontDescription) const 69 bool isFixedPitch(const FontDescription& fontDescription) const
69 { 70 {
70 if (m_pitch == UnknownPitch) 71 if (m_pitch == UnknownPitchFont)
71 determinePitch(fontDescription); 72 determinePitch(fontDescription);
72 return m_pitch == FixedPitch; 73 return m_pitch == FixedPitchFont;
73 } 74 }
74 void determinePitch(const FontDescription&) const; 75 void determinePitch(const FontDescription&) const;
75 76
76 bool loadingCustomFonts() const; 77 bool loadingCustomFonts() const;
77 bool shouldSkipDrawing() const; 78 bool shouldSkipDrawing() const;
78 79
79 FontSelector* fontSelector() const { return m_fontSelector.get(); } 80 FontSelector* fontSelector() const { return m_fontSelector.get(); }
80 // FIXME: It should be possible to combine fontSelectorVersion and generatio n. 81 // FIXME: It should be possible to combine fontSelectorVersion and generatio n.
81 unsigned fontSelectorVersion() const { return m_fontSelectorVersion; } 82 unsigned fontSelectorVersion() const { return m_fontSelectorVersion; }
82 unsigned generation() const { return m_generation; } 83 unsigned generation() const { return m_generation; }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 117
117 mutable Vector<RefPtr<FontData>, 1> m_fontList; 118 mutable Vector<RefPtr<FontData>, 1> m_fontList;
118 GlyphPages m_pages; 119 GlyphPages m_pages;
119 GlyphPageTreeNodeBase* m_pageZero; 120 GlyphPageTreeNodeBase* m_pageZero;
120 mutable const SimpleFontData* m_cachedPrimarySimpleFontData; 121 mutable const SimpleFontData* m_cachedPrimarySimpleFontData;
121 RefPtrWillBePersistent<FontSelector> m_fontSelector; 122 RefPtrWillBePersistent<FontSelector> m_fontSelector;
122 mutable WidthCache m_widthCache; 123 mutable WidthCache m_widthCache;
123 unsigned m_fontSelectorVersion; 124 unsigned m_fontSelectorVersion;
124 mutable int m_familyIndex; 125 mutable int m_familyIndex;
125 unsigned short m_generation; 126 unsigned short m_generation;
126 mutable unsigned m_pitch : 3; // Pitch 127 mutable FixedPitchFontType m_pitch : 3; // Pitch
127 mutable bool m_hasLoadingFallback : 1; 128 mutable bool m_hasLoadingFallback : 1;
128 }; 129 };
129 130
130 } // namespace blink 131 } // namespace blink
131 132
132 #endif 133 #endif
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontDescription.h ('k') | Source/platform/fonts/FontFallbackList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698