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

Side by Side Diff: src/core/SkTypeface.cpp

Issue 21149008: refactoring for SK_FONTHOST_USES_FONTMGR option (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkFontHost.cpp ('k') | src/ports/SkFontHost_win.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 2011 The Android Open Source Project 2 * Copyright 2011 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkAdvancedTypefaceMetrics.h" 8 #include "SkAdvancedTypefaceMetrics.h"
9 #include "SkFontDescriptor.h" 9 #include "SkFontDescriptor.h"
10 #include "SkFontHost.h" 10 #include "SkFontHost.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 name->set(desc.getFamilyName()); 202 name->set(desc.getFamilyName());
203 } 203 }
204 204
205 SkAdvancedTypefaceMetrics* SkTypeface::getAdvancedTypefaceMetrics( 205 SkAdvancedTypefaceMetrics* SkTypeface::getAdvancedTypefaceMetrics(
206 SkAdvancedTypefaceMetrics::PerGlyphInfo info, 206 SkAdvancedTypefaceMetrics::PerGlyphInfo info,
207 const uint32_t* glyphIDs, 207 const uint32_t* glyphIDs,
208 uint32_t glyphIDsCount) const { 208 uint32_t glyphIDsCount) const {
209 return this->onGetAdvancedTypefaceMetrics(info, glyphIDs, glyphIDsCount); 209 return this->onGetAdvancedTypefaceMetrics(info, glyphIDs, glyphIDsCount);
210 } 210 }
211 211
212 SkTypeface* SkTypeface::refMatchingStyle(Style style) const {
213 return this->onRefMatchingStyle(style);
214 }
215
212 /////////////////////////////////////////////////////////////////////////////// 216 ///////////////////////////////////////////////////////////////////////////////
213 /////////////////////////////////////////////////////////////////////////////// 217 ///////////////////////////////////////////////////////////////////////////////
214 218
215 int SkTypeface::onCharsToGlyphs(const void* chars, Encoding encoding, 219 int SkTypeface::onCharsToGlyphs(const void* chars, Encoding encoding,
216 uint16_t glyphs[], int glyphCount) const { 220 uint16_t glyphs[], int glyphCount) const {
217 SkDebugf("onCharsToGlyphs unimplemented\n"); 221 SkDebugf("onCharsToGlyphs unimplemented\n");
218 if (glyphs && glyphCount > 0) { 222 if (glyphs && glyphCount > 0) {
219 sk_bzero(glyphs, glyphCount * sizeof(glyphs[0])); 223 sk_bzero(glyphs, glyphCount * sizeof(glyphs[0]));
220 } 224 }
221 return 0; 225 return 0;
(...skipping 20 matching lines...) Expand all
242 } 246 }
243 247
244 size_t SkTypeface::onGetTableData(SkFontTableTag tag, size_t offset, 248 size_t SkTypeface::onGetTableData(SkFontTableTag tag, size_t offset,
245 size_t length, void* data) const { 249 size_t length, void* data) const {
246 int ttcIndex; 250 int ttcIndex;
247 SkAutoTUnref<SkStream> stream(this->openStream(&ttcIndex)); 251 SkAutoTUnref<SkStream> stream(this->openStream(&ttcIndex));
248 return stream.get() 252 return stream.get()
249 ? SkFontStream::GetTableData(stream, ttcIndex, tag, offset, length, data ) 253 ? SkFontStream::GetTableData(stream, ttcIndex, tag, offset, length, data )
250 : 0; 254 : 0;
251 } 255 }
OLDNEW
« no previous file with comments | « src/core/SkFontHost.cpp ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698