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

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

Issue 1213003004: Fix virtual/override/final usage in Source/platform/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 public: 101 public:
102 static GlyphPageTreeNodeBase* getRootChild(const FontData* fontData, unsigne d pageNumber) { return getRoot(pageNumber)->getChild(fontData, pageNumber); } 102 static GlyphPageTreeNodeBase* getRootChild(const FontData* fontData, unsigne d pageNumber) { return getRoot(pageNumber)->getChild(fontData, pageNumber); }
103 static GlyphPageTreeNode* getNormalRootChild(const FontData* fontData, unsig ned pageNumber) { return getRoot(pageNumber)->getNormalChild(fontData, pageNumbe r); } 103 static GlyphPageTreeNode* getNormalRootChild(const FontData* fontData, unsig ned pageNumber) { return getRoot(pageNumber)->getNormalChild(fontData, pageNumbe r); }
104 104
105 static void pruneTreeCustomFontData(const FontData*); 105 static void pruneTreeCustomFontData(const FontData*);
106 static void pruneTreeFontData(const SimpleFontData*); 106 static void pruneTreeFontData(const SimpleFontData*);
107 107
108 void pruneCustomFontData(const FontData*); 108 void pruneCustomFontData(const FontData*);
109 void pruneFontData(const SimpleFontData*, unsigned level = 0); 109 void pruneFontData(const SimpleFontData*, unsigned level = 0);
110 110
111 virtual GlyphPage* page(UScriptCode = USCRIPT_COMMON) override final { retur n m_page.get(); } 111 GlyphPage* page(UScriptCode = USCRIPT_COMMON) final { return m_page.get(); }
112 112
113 GlyphPageTreeNodeBase* getChild(const FontData*, unsigned pageNumber); 113 GlyphPageTreeNodeBase* getChild(const FontData*, unsigned pageNumber);
114 GlyphPageTreeNode* getNormalChild(const FontData*, unsigned pageNumber); 114 GlyphPageTreeNode* getNormalChild(const FontData*, unsigned pageNumber);
115 SystemFallbackGlyphPageTreeNode* getSystemFallbackChild(unsigned pageNumber) ; 115 SystemFallbackGlyphPageTreeNode* getSystemFallbackChild(unsigned pageNumber) ;
116 116
117 static size_t treeGlyphPageCount(); 117 static size_t treeGlyphPageCount();
118 size_t pageCount() const; 118 size_t pageCount() const;
119 119
120 private: 120 private:
121 GlyphPageTreeNode(GlyphPageTreeNode* parent = nullptr) : GlyphPageTreeNodeBa se(parent, false) { } 121 GlyphPageTreeNode(GlyphPageTreeNode* parent = nullptr) : GlyphPageTreeNodeBa se(parent, false) { }
(...skipping 12 matching lines...) Expand all
134 static GlyphPageTreeNode* pageZeroRoot; 134 static GlyphPageTreeNode* pageZeroRoot;
135 135
136 RefPtr<GlyphPage> m_page; 136 RefPtr<GlyphPage> m_page;
137 typedef HashMap<const FontData*, OwnPtr<GlyphPageTreeNode>> GlyphPageTreeNod eMap; 137 typedef HashMap<const FontData*, OwnPtr<GlyphPageTreeNode>> GlyphPageTreeNod eMap;
138 GlyphPageTreeNodeMap m_children; 138 GlyphPageTreeNodeMap m_children;
139 OwnPtr<SystemFallbackGlyphPageTreeNode> m_systemFallbackChild; 139 OwnPtr<SystemFallbackGlyphPageTreeNode> m_systemFallbackChild;
140 }; 140 };
141 141
142 class PLATFORM_EXPORT SystemFallbackGlyphPageTreeNode : public GlyphPageTreeNode Base { 142 class PLATFORM_EXPORT SystemFallbackGlyphPageTreeNode : public GlyphPageTreeNode Base {
143 public: 143 public:
144 virtual GlyphPage* page(UScriptCode = USCRIPT_COMMON) override final; 144 GlyphPage* page(UScriptCode = USCRIPT_COMMON) final;
145 145
146 private: 146 private:
147 friend class GlyphPageTreeNode; 147 friend class GlyphPageTreeNode;
148 148
149 SystemFallbackGlyphPageTreeNode(GlyphPageTreeNode* parent) : GlyphPageTreeNo deBase(parent, true) { } 149 SystemFallbackGlyphPageTreeNode(GlyphPageTreeNode* parent) : GlyphPageTreeNo deBase(parent, true) { }
150 150
151 void pruneFontData(const SimpleFontData*); 151 void pruneFontData(const SimpleFontData*);
152 PassRefPtr<GlyphPage> initializePage(); 152 PassRefPtr<GlyphPage> initializePage();
153 153
154 struct UScriptCodeHashTraits : WTF::GenericHashTraits<UScriptCode> { 154 struct UScriptCodeHashTraits : WTF::GenericHashTraits<UScriptCode> {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 inline GlyphPageTreeNodeBase* GlyphPageTreeNode::getChild(const FontData* fontDa ta, unsigned pageNumber) 186 inline GlyphPageTreeNodeBase* GlyphPageTreeNode::getChild(const FontData* fontDa ta, unsigned pageNumber)
187 { 187 {
188 if (fontData) 188 if (fontData)
189 return getNormalChild(fontData, pageNumber); 189 return getNormalChild(fontData, pageNumber);
190 return getSystemFallbackChild(pageNumber); 190 return getSystemFallbackChild(pageNumber);
191 } 191 }
192 192
193 } // namespace blink 193 } // namespace blink
194 194
195 #endif // GlyphPageTreeNode_h 195 #endif // GlyphPageTreeNode_h
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontCacheTest.cpp ('k') | Source/platform/fonts/GlyphPageTreeNodeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698