| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2007-2008 Torch Mobile, Inc. | 3 * Copyright (C) 2007-2008 Torch Mobile, Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 void DumpShapeResultCache(base::trace_event::ProcessMemoryDump*); | 221 void DumpShapeResultCache(base::trace_event::ProcessMemoryDump*); |
| 222 | 222 |
| 223 private: | 223 private: |
| 224 FontCache(); | 224 FontCache(); |
| 225 ~FontCache(); | 225 ~FontCache(); |
| 226 | 226 |
| 227 void Purge(PurgeSeverity = kPurgeIfNeeded); | 227 void Purge(PurgeSeverity = kPurgeIfNeeded); |
| 228 | 228 |
| 229 void DisablePurging() { purge_prevent_count_++; } | 229 void DisablePurging() { purge_prevent_count_++; } |
| 230 void EnablePurging() { | 230 void EnablePurging() { |
| 231 ASSERT(purge_prevent_count_); | 231 DCHECK(purge_prevent_count_); |
| 232 if (!--purge_prevent_count_) | 232 if (!--purge_prevent_count_) |
| 233 Purge(kPurgeIfNeeded); | 233 Purge(kPurgeIfNeeded); |
| 234 } | 234 } |
| 235 | 235 |
| 236 // FIXME: This method should eventually be removed. | 236 // FIXME: This method should eventually be removed. |
| 237 FontPlatformData* GetFontPlatformData( | 237 FontPlatformData* GetFontPlatformData( |
| 238 const FontDescription&, | 238 const FontDescription&, |
| 239 const FontFaceCreationParams&, | 239 const FontFaceCreationParams&, |
| 240 AlternateFontName = AlternateFontName::kAllowAlternate); | 240 AlternateFontName = AlternateFontName::kAllowAlternate); |
| 241 #if !OS(MACOSX) | 241 #if !OS(MACOSX) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 public: | 303 public: |
| 304 FontCachePurgePreventer() { FontCache::GetFontCache()->DisablePurging(); } | 304 FontCachePurgePreventer() { FontCache::GetFontCache()->DisablePurging(); } |
| 305 ~FontCachePurgePreventer() { FontCache::GetFontCache()->EnablePurging(); } | 305 ~FontCachePurgePreventer() { FontCache::GetFontCache()->EnablePurging(); } |
| 306 }; | 306 }; |
| 307 | 307 |
| 308 AtomicString ToAtomicString(const SkString&); | 308 AtomicString ToAtomicString(const SkString&); |
| 309 | 309 |
| 310 } // namespace blink | 310 } // namespace blink |
| 311 | 311 |
| 312 #endif | 312 #endif |
| OLD | NEW |