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

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

Issue 179723005: Remove GDI font rendering code for windows (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/fonts/AlternateFontFamily.h ('k') | Source/platform/fonts/FontCache.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 Computer, Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2007-2008 Torch Mobile, Inc. 3 * Copyright (C) 2007-2008 Torch Mobile, Inc.
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 23 matching lines...) Expand all
34 #include "platform/PlatformExport.h" 34 #include "platform/PlatformExport.h"
35 #include "wtf/Forward.h" 35 #include "wtf/Forward.h"
36 #include "wtf/PassRefPtr.h" 36 #include "wtf/PassRefPtr.h"
37 #include "wtf/RefPtr.h" 37 #include "wtf/RefPtr.h"
38 #include "wtf/Vector.h" 38 #include "wtf/Vector.h"
39 #include "wtf/text/CString.h" 39 #include "wtf/text/CString.h"
40 #include "wtf/text/WTFString.h" 40 #include "wtf/text/WTFString.h"
41 #include "wtf/unicode/Unicode.h" 41 #include "wtf/unicode/Unicode.h"
42 42
43 #if OS(WIN) 43 #if OS(WIN)
44 #include "SkFontMgr.h"
44 #include <windows.h> 45 #include <windows.h>
45 #include <objidl.h> 46 #include <objidl.h>
46 #include <mlang.h> 47 #include <mlang.h>
47 #endif 48 #endif
48 49
49 #if OS(WIN) && !ENABLE(GDI_FONTS_ON_WINDOWS)
50 #include "SkFontMgr.h"
51 #endif
52
53 class SkTypeface; 50 class SkTypeface;
54 51
55 namespace WebCore { 52 namespace WebCore {
56 53
57 class FontCacheClient; 54 class FontCacheClient;
58 class FontPlatformData; 55 class FontPlatformData;
59 class FontData; 56 class FontData;
60 class FontDescription; 57 class FontDescription;
61 class OpenTypeVerticalData; 58 class OpenTypeVerticalData;
62 class SimpleFontData; 59 class SimpleFontData;
(...skipping 25 matching lines...) Expand all
88 void addClient(FontCacheClient*); 85 void addClient(FontCacheClient*);
89 void removeClient(FontCacheClient*); 86 void removeClient(FontCacheClient*);
90 87
91 unsigned short generation(); 88 unsigned short generation();
92 void invalidate(); 89 void invalidate();
93 90
94 #if OS(WIN) 91 #if OS(WIN)
95 PassRefPtr<SimpleFontData> fontDataFromDescriptionAndLogFont(const FontDescr iption&, ShouldRetain, const LOGFONT&, wchar_t* outFontFamilyName); 92 PassRefPtr<SimpleFontData> fontDataFromDescriptionAndLogFont(const FontDescr iption&, ShouldRetain, const LOGFONT&, wchar_t* outFontFamilyName);
96 #endif 93 #endif
97 94
98 #if OS(WIN) && !ENABLE(GDI_FONTS_ON_WINDOWS) 95 #if OS(WIN)
99 bool useSubpixelPositioning() const { return m_useSubpixelPositioning; } 96 bool useSubpixelPositioning() const { return m_useSubpixelPositioning; }
100 SkFontMgr* fontManager() { return m_fontManager.get(); } 97 SkFontMgr* fontManager() { return m_fontManager.get(); }
101 #endif 98 #endif
102 99
103 #if ENABLE(OPENTYPE_VERTICAL) 100 #if ENABLE(OPENTYPE_VERTICAL)
104 typedef uint32_t FontFileKey; 101 typedef uint32_t FontFileKey;
105 PassRefPtr<OpenTypeVerticalData> getVerticalData(const FontFileKey&, const F ontPlatformData&); 102 PassRefPtr<OpenTypeVerticalData> getVerticalData(const FontFileKey&, const F ontPlatformData&);
106 #endif 103 #endif
107 104
108 #if OS(ANDROID) 105 #if OS(ANDROID)
(...skipping 28 matching lines...) Expand all
137 FontPlatformData* createFontPlatformData(const FontDescription&, const Atomi cString& family, float fontSize); 134 FontPlatformData* createFontPlatformData(const FontDescription&, const Atomi cString& family, float fontSize);
138 135
139 // Implemented on skia platforms. 136 // Implemented on skia platforms.
140 PassRefPtr<SkTypeface> createTypeface(const FontDescription&, const AtomicSt ring& family, CString& name); 137 PassRefPtr<SkTypeface> createTypeface(const FontDescription&, const AtomicSt ring& family, CString& name);
141 138
142 PassRefPtr<SimpleFontData> fontDataFromFontPlatformData(const FontPlatformDa ta*, ShouldRetain = Retain); 139 PassRefPtr<SimpleFontData> fontDataFromFontPlatformData(const FontPlatformDa ta*, ShouldRetain = Retain);
143 140
144 // Don't purge if this count is > 0; 141 // Don't purge if this count is > 0;
145 int m_purgePreventCount; 142 int m_purgePreventCount;
146 143
147 #if OS(WIN) && !ENABLE(GDI_FONTS_ON_WINDOWS) 144 #if OS(WIN)
148 OwnPtr<SkFontMgr> m_fontManager; 145 OwnPtr<SkFontMgr> m_fontManager;
149 bool m_useSubpixelPositioning; 146 bool m_useSubpixelPositioning;
150 #endif 147 #endif
151 148
152 #if OS(MACOSX) || OS(ANDROID) 149 #if OS(MACOSX) || OS(ANDROID)
153 friend class ComplexTextController; 150 friend class ComplexTextController;
154 #endif 151 #endif
155 friend class SimpleFontData; // For fontDataFromFontPlatformData 152 friend class SimpleFontData; // For fontDataFromFontPlatformData
156 friend class FontFallbackList; 153 friend class FontFallbackList;
157 }; 154 };
158 155
159 class PLATFORM_EXPORT FontCachePurgePreventer { 156 class PLATFORM_EXPORT FontCachePurgePreventer {
160 public: 157 public:
161 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); } 158 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); }
162 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); } 159 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); }
163 }; 160 };
164 161
165 } 162 }
166 163
167 #endif 164 #endif
OLDNEW
« no previous file with comments | « Source/platform/fonts/AlternateFontFamily.h ('k') | Source/platform/fonts/FontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698