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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontCache.cpp

Issue 1763803002: Pass Windows font rendering preferences from browser to blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 #endif // !OS(WIN) 67 #endif // !OS(WIN)
68 68
69 typedef HashMap<FontCacheKey, OwnPtr<FontPlatformData>, FontCacheKeyHash, FontCa cheKeyTraits> FontPlatformDataCache; 69 typedef HashMap<FontCacheKey, OwnPtr<FontPlatformData>, FontCacheKeyHash, FontCa cheKeyTraits> FontPlatformDataCache;
70 typedef HashMap<FallbackListCompositeKey, OwnPtr<ShapeCache>, FallbackListCompos iteKeyHash, FallbackListCompositeKeyTraits> FallbackListShaperCache; 70 typedef HashMap<FallbackListCompositeKey, OwnPtr<ShapeCache>, FallbackListCompos iteKeyHash, FallbackListCompositeKeyTraits> FallbackListShaperCache;
71 71
72 static FontPlatformDataCache* gFontPlatformDataCache = nullptr; 72 static FontPlatformDataCache* gFontPlatformDataCache = nullptr;
73 static FallbackListShaperCache* gFallbackListShaperCache = nullptr; 73 static FallbackListShaperCache* gFallbackListShaperCache = nullptr;
74 74
75 #if OS(WIN) 75 #if OS(WIN)
76 bool FontCache::s_useDirectWrite = false; 76 bool FontCache::s_useDirectWrite = false;
77 bool FontCache::s_antialiasedTextEnabled = false;
78 bool FontCache::s_lcdTextEnabled = false;
77 SkFontMgr* FontCache::s_fontManager = nullptr; 79 SkFontMgr* FontCache::s_fontManager = nullptr;
78 bool FontCache::s_useSubpixelPositioning = false; 80 bool FontCache::s_useSubpixelPositioning = false;
79 float FontCache::s_deviceScaleFactor = 1.0; 81 float FontCache::s_deviceScaleFactor = 1.0;
80 #endif // OS(WIN) 82 #endif // OS(WIN)
81 83
82 FontCache* FontCache::fontCache() 84 FontCache* FontCache::fontCache()
83 { 85 {
84 DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ()); 86 DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ());
85 return &globalFontCache; 87 return &globalFontCache;
86 } 88 }
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 iter != gFallbackListShaperCache->end(); 377 iter != gFallbackListShaperCache->end();
376 ++iter) { 378 ++iter) {
377 shapeResultCacheSize += iter->value->byteSize(); 379 shapeResultCacheSize += iter->value->byteSize();
378 } 380 }
379 dump->addScalar("size", "bytes", shapeResultCacheSize); 381 dump->addScalar("size", "bytes", shapeResultCacheSize);
380 memoryDump->addSuballocation(dump->guid(), String(WTF::Partitions::kAllocate dObjectPoolName)); 382 memoryDump->addSuballocation(dump->guid(), String(WTF::Partitions::kAllocate dObjectPoolName));
381 } 383 }
382 384
383 385
384 } // namespace blink 386 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698