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

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

Issue 210243004: Usage of DirectWrite now determined browser-side (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: include Created 6 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
« no previous file with comments | « Source/platform/fonts/FontCache.h ('k') | Source/platform/fonts/win/FontCacheSkiaWin.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 FontCache::FontCache() 57 FontCache::FontCache()
58 : m_purgePreventCount(0) 58 : m_purgePreventCount(0)
59 { 59 {
60 } 60 }
61 #endif // !OS(WIN) 61 #endif // !OS(WIN)
62 62
63 typedef HashMap<FontCacheKey, OwnPtr<FontPlatformData>, FontCacheKeyHash, FontCa cheKeyTraits> FontPlatformDataCache; 63 typedef HashMap<FontCacheKey, OwnPtr<FontPlatformData>, FontCacheKeyHash, FontCa cheKeyTraits> FontPlatformDataCache;
64 64
65 static FontPlatformDataCache* gFontPlatformDataCache = 0; 65 static FontPlatformDataCache* gFontPlatformDataCache = 0;
66 66
67 #if OS(WIN)
68 bool FontCache::s_useDirectWrite = false;
69 bool FontCache::s_useSubpixelPositioning = false;
70 #endif // OS(WIN)
71
67 FontCache* FontCache::fontCache() 72 FontCache* FontCache::fontCache()
68 { 73 {
69 DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ()); 74 DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ());
70 return &globalFontCache; 75 return &globalFontCache;
71 } 76 }
72 77
73 FontPlatformData* FontCache::getFontPlatformData(const FontDescription& fontDesc ription, 78 FontPlatformData* FontCache::getFontPlatformData(const FontDescription& fontDesc ription,
74 const AtomicString& passedFamilyName, bool checkingAlternateName) 79 const AtomicString& passedFamilyName, bool checkingAlternateName)
75 { 80 {
76 #if OS(WIN) && ENABLE(OPENTYPE_VERTICAL) 81 #if OS(WIN) && ENABLE(OPENTYPE_VERTICAL)
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 clients.append(*it); 290 clients.append(*it);
286 291
287 ASSERT(numClients == clients.size()); 292 ASSERT(numClients == clients.size());
288 for (size_t i = 0; i < numClients; ++i) 293 for (size_t i = 0; i < numClients; ++i)
289 clients[i]->fontCacheInvalidated(); 294 clients[i]->fontCacheInvalidated();
290 295
291 purge(ForcePurge); 296 purge(ForcePurge);
292 } 297 }
293 298
294 } // namespace WebCore 299 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontCache.h ('k') | Source/platform/fonts/win/FontCacheSkiaWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698