| 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 26 matching lines...) Expand all Loading... |
| 37 #include "platform/fonts/FontFallbackPriority.h" | 37 #include "platform/fonts/FontFallbackPriority.h" |
| 38 #include "wtf/Allocator.h" | 38 #include "wtf/Allocator.h" |
| 39 #include "wtf/Forward.h" | 39 #include "wtf/Forward.h" |
| 40 #include "wtf/HashMap.h" | 40 #include "wtf/HashMap.h" |
| 41 #include "wtf/PassRefPtr.h" | 41 #include "wtf/PassRefPtr.h" |
| 42 #include "wtf/RefPtr.h" | 42 #include "wtf/RefPtr.h" |
| 43 #include "wtf/text/CString.h" | 43 #include "wtf/text/CString.h" |
| 44 #include "wtf/text/Unicode.h" | 44 #include "wtf/text/Unicode.h" |
| 45 #include "wtf/text/WTFString.h" | 45 #include "wtf/text/WTFString.h" |
| 46 #include <limits.h> | 46 #include <limits.h> |
| 47 #include <memory> | |
| 48 | 47 |
| 49 #include "SkFontMgr.h" | 48 #include "SkFontMgr.h" |
| 50 | 49 |
| 51 class SkTypeface; | 50 class SkTypeface; |
| 52 | 51 |
| 53 namespace base { | 52 namespace base { |
| 54 namespace trace_event { | 53 namespace trace_event { |
| 55 class ProcessMemoryDump; | 54 class ProcessMemoryDump; |
| 56 } | 55 } |
| 57 } | 56 } |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 { | 165 { |
| 167 ASSERT(m_purgePreventCount); | 166 ASSERT(m_purgePreventCount); |
| 168 if (!--m_purgePreventCount) | 167 if (!--m_purgePreventCount) |
| 169 purge(PurgeIfNeeded); | 168 purge(PurgeIfNeeded); |
| 170 } | 169 } |
| 171 | 170 |
| 172 // FIXME: This method should eventually be removed. | 171 // FIXME: This method should eventually be removed. |
| 173 FontPlatformData* getFontPlatformData(const FontDescription&, const FontFace
CreationParams&, bool checkingAlternateName = false); | 172 FontPlatformData* getFontPlatformData(const FontDescription&, const FontFace
CreationParams&, bool checkingAlternateName = false); |
| 174 | 173 |
| 175 // These methods are implemented by each platform. | 174 // These methods are implemented by each platform. |
| 176 std::unique_ptr<FontPlatformData> createFontPlatformData(const FontDescripti
on&, const FontFaceCreationParams&, float fontSize); | 175 PassOwnPtr<FontPlatformData> createFontPlatformData(const FontDescription&,
const FontFaceCreationParams&, float fontSize); |
| 177 std::unique_ptr<FontPlatformData> scaleFontPlatformData(const FontPlatformDa
ta&, const FontDescription&, const FontFaceCreationParams&, float fontSize); | 176 PassOwnPtr<FontPlatformData> scaleFontPlatformData(const FontPlatformData&,
const FontDescription&, const FontFaceCreationParams&, float fontSize); |
| 178 | 177 |
| 179 // Implemented on skia platforms. | 178 // Implemented on skia platforms. |
| 180 PassRefPtr<SkTypeface> createTypeface(const FontDescription&, const FontFace
CreationParams&, CString& name); | 179 PassRefPtr<SkTypeface> createTypeface(const FontDescription&, const FontFace
CreationParams&, CString& name); |
| 181 | 180 |
| 182 #if OS(ANDROID) || OS(LINUX) | 181 #if OS(ANDROID) || OS(LINUX) |
| 183 static AtomicString getFamilyNameForCharacter(SkFontMgr*, UChar32, const Fon
tDescription&, FontFallbackPriority); | 182 static AtomicString getFamilyNameForCharacter(SkFontMgr*, UChar32, const Fon
tDescription&, FontFallbackPriority); |
| 184 #endif | 183 #endif |
| 185 | 184 |
| 186 PassRefPtr<SimpleFontData> fallbackOnStandardFontStyle(const FontDescription
&, UChar32); | 185 PassRefPtr<SimpleFontData> fallbackOnStandardFontStyle(const FontDescription
&, UChar32); |
| 187 | 186 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 217 public: | 216 public: |
| 218 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); } | 217 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); } |
| 219 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); } | 218 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); } |
| 220 }; | 219 }; |
| 221 | 220 |
| 222 CString toSkFontMgrLocale(const String& locale); | 221 CString toSkFontMgrLocale(const String& locale); |
| 223 | 222 |
| 224 } // namespace blink | 223 } // namespace blink |
| 225 | 224 |
| 226 #endif | 225 #endif |
| OLD | NEW |