OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
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 11 matching lines...) Expand all Loading... |
22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 */ | 28 */ |
29 | 29 |
30 #include "platform/fonts/FontCache.h" | 30 #include "platform/fonts/FontCache.h" |
31 | 31 |
| 32 #include <memory> |
32 #include "base/trace_event/process_memory_dump.h" | 33 #include "base/trace_event/process_memory_dump.h" |
33 #include "platform/FontFamilyNames.h" | 34 #include "platform/FontFamilyNames.h" |
34 #include "platform/Histogram.h" | 35 #include "platform/Histogram.h" |
35 #include "platform/RuntimeEnabledFeatures.h" | 36 #include "platform/RuntimeEnabledFeatures.h" |
36 #include "platform/fonts/AcceptLanguagesResolver.h" | 37 #include "platform/fonts/AcceptLanguagesResolver.h" |
37 #include "platform/fonts/AlternateFontFamily.h" | 38 #include "platform/fonts/AlternateFontFamily.h" |
38 #include "platform/fonts/FontCacheClient.h" | 39 #include "platform/fonts/FontCacheClient.h" |
39 #include "platform/fonts/FontCacheKey.h" | 40 #include "platform/fonts/FontCacheKey.h" |
40 #include "platform/fonts/FontDataCache.h" | 41 #include "platform/fonts/FontDataCache.h" |
41 #include "platform/fonts/FontDescription.h" | 42 #include "platform/fonts/FontDescription.h" |
42 #include "platform/fonts/FontPlatformData.h" | 43 #include "platform/fonts/FontPlatformData.h" |
43 #include "platform/fonts/FontSmoothingMode.h" | 44 #include "platform/fonts/FontSmoothingMode.h" |
44 #include "platform/fonts/SimpleFontData.h" | 45 #include "platform/fonts/SimpleFontData.h" |
45 #include "platform/fonts/TextRenderingMode.h" | 46 #include "platform/fonts/TextRenderingMode.h" |
46 #include "platform/fonts/opentype/OpenTypeVerticalData.h" | 47 #include "platform/fonts/opentype/OpenTypeVerticalData.h" |
47 #include "platform/fonts/shaping/ShapeCache.h" | 48 #include "platform/fonts/shaping/ShapeCache.h" |
48 #include "platform/instrumentation/tracing/web_memory_allocator_dump.h" | 49 #include "platform/instrumentation/tracing/web_memory_allocator_dump.h" |
49 #include "platform/instrumentation/tracing/web_process_memory_dump.h" | 50 #include "platform/instrumentation/tracing/web_process_memory_dump.h" |
50 #include "public/platform/Platform.h" | 51 #include "public/platform/Platform.h" |
51 #include "ui/gfx/font_list.h" | 52 #include "ui/gfx/font_list.h" |
52 #include "wtf/HashMap.h" | 53 #include "wtf/HashMap.h" |
53 #include "wtf/ListHashSet.h" | 54 #include "wtf/ListHashSet.h" |
54 #include "wtf/PtrUtil.h" | 55 #include "wtf/PtrUtil.h" |
55 #include "wtf/StdLibExtras.h" | 56 #include "wtf/StdLibExtras.h" |
56 #include "wtf/Vector.h" | 57 #include "wtf/Vector.h" |
57 #include "wtf/text/AtomicStringHash.h" | 58 #include "wtf/text/AtomicStringHash.h" |
58 #include "wtf/text/StringHash.h" | 59 #include "wtf/text/StringHash.h" |
59 #include <memory> | |
60 | 60 |
61 using namespace WTF; | 61 using namespace WTF; |
62 | 62 |
63 namespace blink { | 63 namespace blink { |
64 | 64 |
65 #if !OS(WIN) && !OS(LINUX) | 65 #if !OS(WIN) && !OS(LINUX) |
66 FontCache::FontCache() : m_purgePreventCount(0), m_fontManager(nullptr) {} | 66 FontCache::FontCache() : m_purgePreventCount(0), m_fontManager(nullptr) {} |
67 #endif // !OS(WIN) && !OS(LINUX) | 67 #endif // !OS(WIN) && !OS(LINUX) |
68 | 68 |
69 typedef HashMap<unsigned, | 69 typedef HashMap<unsigned, |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 for (iter = gFallbackListShaperCache->begin(); | 483 for (iter = gFallbackListShaperCache->begin(); |
484 iter != gFallbackListShaperCache->end(); ++iter) { | 484 iter != gFallbackListShaperCache->end(); ++iter) { |
485 shapeResultCacheSize += iter->value->byteSize(); | 485 shapeResultCacheSize += iter->value->byteSize(); |
486 } | 486 } |
487 dump->AddScalar("size", "bytes", shapeResultCacheSize); | 487 dump->AddScalar("size", "bytes", shapeResultCacheSize); |
488 memoryDump->AddSuballocation(dump->guid(), | 488 memoryDump->AddSuballocation(dump->guid(), |
489 WTF::Partitions::kAllocatedObjectPoolName); | 489 WTF::Partitions::kAllocatedObjectPoolName); |
490 } | 490 } |
491 | 491 |
492 } // namespace blink | 492 } // namespace blink |
OLD | NEW |