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

Side by Side Diff: skia/ext/SkFontHost_fontconfig.cpp

Issue 9347043: Remove SkFontHost::ValidFontID. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 10 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* libs/graphics/ports/SkFontHost_fontconfig.cpp 1 /* libs/graphics/ports/SkFontHost_fontconfig.cpp
2 ** 2 **
3 ** Copyright 2008, Google Inc. 3 ** Copyright 2008, Google Inc.
4 ** 4 **
5 ** Licensed under the Apache License, Version 2.0 (the "License"); 5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License. 6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at 7 ** You may obtain a copy of the License at
8 ** 8 **
9 ** http://www.apache.org/licenses/LICENSE-2.0 9 ** http://www.apache.org/licenses/LICENSE-2.0
10 ** 10 **
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 return typeface; 201 return typeface;
202 } 202 }
203 203
204 // static 204 // static
205 SkTypeface* SkFontHost::CreateTypefaceFromFile(const char path[]) 205 SkTypeface* SkFontHost::CreateTypefaceFromFile(const char path[])
206 { 206 {
207 SkASSERT(!"SkFontHost::CreateTypefaceFromFile unimplemented"); 207 SkASSERT(!"SkFontHost::CreateTypefaceFromFile unimplemented");
208 return NULL; 208 return NULL;
209 } 209 }
210 210
211 // static
212 bool SkFontHost::ValidFontID(SkFontID uniqueID) {
213 if (IsRemoteFont(UniqueIdToFileFaceId(uniqueID))) {
214 // remote font
215 SkAutoMutexAcquire ac(global_remote_font_map_lock);
216 return global_remote_fonts.find(uniqueID) != global_remote_fonts.end();
217 } else {
218 // local font
219 SkAutoMutexAcquire ac(global_fc_map_lock);
220 return global_fc_typefaces.find(uniqueID) != global_fc_typefaces.end();
221 }
222 }
223
224 void SkFontHost::Serialize(const SkTypeface*, SkWStream*) { 211 void SkFontHost::Serialize(const SkTypeface*, SkWStream*) {
225 SkASSERT(!"SkFontHost::Serialize unimplemented"); 212 SkASSERT(!"SkFontHost::Serialize unimplemented");
226 } 213 }
227 214
228 SkTypeface* SkFontHost::Deserialize(SkStream* stream) { 215 SkTypeface* SkFontHost::Deserialize(SkStream* stream) {
229 SkASSERT(!"SkFontHost::Deserialize unimplemented"); 216 SkASSERT(!"SkFontHost::Deserialize unimplemented");
230 return NULL; 217 return NULL;
231 } 218 }
232 219
233 // static 220 // static
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 if (!path) 327 if (!path)
341 return 1; 328 return 1;
342 } 329 }
343 330
344 if (path) 331 if (path)
345 SkASSERT(!"SkFontHost::GetFileName does not support the font path " 332 SkASSERT(!"SkFontHost::GetFileName does not support the font path "
346 "retrieval."); 333 "retrieval.");
347 334
348 return 0; 335 return 0;
349 } 336 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698