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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/SimpleFontData.h

Issue 2178883002: Added purge method to SimpleFontData and PlatformFontData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * This file is part of the internal font implementation. 2 * This file is part of the internal font implementation.
3 * 3 *
4 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved.
5 * Copyright (C) 2007-2008 Torch Mobile, Inc. 5 * Copyright (C) 2007-2008 Torch Mobile, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 const GlyphData& missingGlyphData() const { return m_missingGlyphData; } 120 const GlyphData& missingGlyphData() const { return m_missingGlyphData; }
121 void setMissingGlyphData(const GlyphData& glyphData) { m_missingGlyphData = glyphData; } 121 void setMissingGlyphData(const GlyphData& glyphData) { m_missingGlyphData = glyphData; }
122 122
123 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; 123 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const;
124 124
125 CustomFontData* customFontData() const { return m_customFontData.get(); } 125 CustomFontData* customFontData() const { return m_customFontData.get(); }
126 126
127 // Implemented by the platform. 127 // Implemented by the platform.
128 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength) const; 128 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength) const;
129 129
130 void purgeMemory();
131
130 protected: 132 protected:
131 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat a, bool isTextOrientationFallback = false); 133 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat a, bool isTextOrientationFallback = false);
132 134
133 SimpleFontData(PassRefPtr<CustomFontData> customData, float fontSize, bool s yntheticBold, bool syntheticItalic); 135 SimpleFontData(PassRefPtr<CustomFontData> customData, float fontSize, bool s yntheticBold, bool syntheticItalic);
134 136
135 private: 137 private:
136 void platformInit(); 138 void platformInit();
137 void platformGlyphInit(); 139 void platformGlyphInit();
138 140
139 PassRefPtr<SimpleFontData> createScaledFontData(const FontDescription&, floa t scaleFactor) const; 141 PassRefPtr<SimpleFontData> createScaledFontData(const FontDescription&, floa t scaleFactor) const;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 width = platformWidthForGlyph(glyph); 209 width = platformWidthForGlyph(glyph);
208 210
209 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); 211 m_glyphToWidthMap.setMetricsForGlyph(glyph, width);
210 return width; 212 return width;
211 } 213 }
212 214
213 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); 215 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false);
214 216
215 } // namespace blink 217 } // namespace blink
216 #endif // SimpleFontData_h 218 #endif // SimpleFontData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698