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

Side by Side Diff: Source/core/platform/graphics/FontCache.cpp

Issue 23480016: Switch non-gdi windows font path to use new SkFontMgr (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 7 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 using namespace WTF; 46 using namespace WTF;
47 47
48 namespace WebCore { 48 namespace WebCore {
49 49
50 FontCache* fontCache() 50 FontCache* fontCache()
51 { 51 {
52 DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ()); 52 DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ());
53 return &globalFontCache; 53 return &globalFontCache;
54 } 54 }
55 55
56 #if !OS(WINDOWS) || ENABLE(GDI_FONTS_ON_WINDOWS)
56 FontCache::FontCache() 57 FontCache::FontCache()
57 : m_purgePreventCount(0) 58 : m_purgePreventCount(0)
58 { 59 {
59 } 60 }
61 #endif // !OS(WINDOWS) || ENABLE(GDI_FONTS_ON_WINDOWS)
60 62
61 struct FontPlatformDataCacheKey { 63 struct FontPlatformDataCacheKey {
62 WTF_MAKE_FAST_ALLOCATED; 64 WTF_MAKE_FAST_ALLOCATED;
63 public: 65 public:
64 FontPlatformDataCacheKey(const AtomicString& family = AtomicString(), unsign ed size = 0, unsigned weight = 0, bool italic = false, 66 FontPlatformDataCacheKey(const AtomicString& family = AtomicString(), unsign ed size = 0, unsigned weight = 0, bool italic = false,
65 bool isPrinterFont = false, FontOrientation orientation = Horizontal, Fo ntWidthVariant widthVariant = RegularWidth) 67 bool isPrinterFont = false, FontOrientation orientation = Horizontal, Fo ntWidthVariant widthVariant = RegularWidth)
66 : m_size(size) 68 : m_size(size)
67 , m_weight(weight) 69 , m_weight(weight)
68 , m_family(family) 70 , m_family(family)
69 , m_italic(italic) 71 , m_italic(italic)
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 case FontDescription::SansSerifFamily: 579 case FontDescription::SansSerifFamily:
578 default: 580 default:
579 fontPlatformData = getFontResourcePlatformData(description, sansStr); 581 fontPlatformData = getFontResourcePlatformData(description, sansStr);
580 break; 582 break;
581 } 583 }
582 584
583 return fontPlatformData; 585 return fontPlatformData;
584 } 586 }
585 587
586 } // namespace WebCore 588 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/platform/graphics/FontCache.h ('k') | Source/core/platform/graphics/skia/FontCacheSkia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698