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

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

Issue 553163002: [DirectWrite] Limit noSubpixelForSmallSizeFont to low-DPI (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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/FontPlatformDataWin.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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #endif // !OS(WIN) 62 #endif // !OS(WIN)
63 63
64 typedef HashMap<FontCacheKey, OwnPtr<FontPlatformData>, FontCacheKeyHash, FontCa cheKeyTraits> FontPlatformDataCache; 64 typedef HashMap<FontCacheKey, OwnPtr<FontPlatformData>, FontCacheKeyHash, FontCa cheKeyTraits> FontPlatformDataCache;
65 65
66 static FontPlatformDataCache* gFontPlatformDataCache = 0; 66 static FontPlatformDataCache* gFontPlatformDataCache = 0;
67 67
68 #if OS(WIN) 68 #if OS(WIN)
69 bool FontCache::s_useDirectWrite = false; 69 bool FontCache::s_useDirectWrite = false;
70 IDWriteFactory* FontCache::s_directWriteFactory = 0; 70 IDWriteFactory* FontCache::s_directWriteFactory = 0;
71 bool FontCache::s_useSubpixelPositioning = false; 71 bool FontCache::s_useSubpixelPositioning = false;
72 float FontCache::s_deviceScaleFactor = 1.0;
72 #endif // OS(WIN) 73 #endif // OS(WIN)
73 74
74 FontCache* FontCache::fontCache() 75 FontCache* FontCache::fontCache()
75 { 76 {
76 DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ()); 77 DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ());
77 return &globalFontCache; 78 return &globalFontCache;
78 } 79 }
79 80
80 FontPlatformData* FontCache::getFontPlatformData(const FontDescription& fontDesc ription, 81 FontPlatformData* FontCache::getFontPlatformData(const FontDescription& fontDesc ription,
81 const FontFaceCreationParams& creationParams, bool checkingAlternateName) 82 const FontFaceCreationParams& creationParams, bool checkingAlternateName)
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 clients.append(*it); 285 clients.append(*it);
285 286
286 ASSERT(numClients == clients.size()); 287 ASSERT(numClients == clients.size());
287 for (size_t i = 0; i < numClients; ++i) 288 for (size_t i = 0; i < numClients; ++i)
288 clients[i]->fontCacheInvalidated(); 289 clients[i]->fontCacheInvalidated();
289 290
290 purge(ForcePurge); 291 purge(ForcePurge);
291 } 292 }
292 293
293 } // namespace blink 294 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontCache.h ('k') | Source/platform/fonts/win/FontPlatformDataWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698