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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontPlatformData.h

Issue 1930503003: Remove font subpixel positioning flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Retain test-only handling on linux Created 4 years, 7 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, 2007, 2008, Google Inc. All rights reserved. 2 * Copyright (c) 2006, 2007, 2008, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // from the 0 one (created with the empty constructor), so we can't just 77 // from the 0 one (created with the empty constructor), so we can't just
78 // set everything to 0. 78 // set everything to 0.
79 FontPlatformData(WTF::HashTableDeletedValueType); 79 FontPlatformData(WTF::HashTableDeletedValueType);
80 FontPlatformData(); 80 FontPlatformData();
81 FontPlatformData(const FontPlatformData&); 81 FontPlatformData(const FontPlatformData&);
82 FontPlatformData(float size, bool syntheticBold, bool syntheticItalic, FontO rientation = FontOrientation::Horizontal); 82 FontPlatformData(float size, bool syntheticBold, bool syntheticItalic, FontO rientation = FontOrientation::Horizontal);
83 FontPlatformData(const FontPlatformData& src, float textSize); 83 FontPlatformData(const FontPlatformData& src, float textSize);
84 #if OS(MACOSX) 84 #if OS(MACOSX)
85 FontPlatformData(NSFont*, float size, bool syntheticBold = false, bool synth eticItalic = false, FontOrientation = FontOrientation::Horizontal); 85 FontPlatformData(NSFont*, float size, bool syntheticBold = false, bool synth eticItalic = false, FontOrientation = FontOrientation::Horizontal);
86 #endif 86 #endif
87 FontPlatformData(PassRefPtr<SkTypeface>, const char* name, float textSize, b ool syntheticBold, bool syntheticItalic, FontOrientation = FontOrientation::Hori zontal, bool subpixelTextPosition = defaultUseSubpixelPositioning()); 87 FontPlatformData(PassRefPtr<SkTypeface>, const char* name, float textSize, b ool syntheticBold, bool syntheticItalic, FontOrientation = FontOrientation::Hori zontal);
88 ~FontPlatformData(); 88 ~FontPlatformData();
89 89
90 #if OS(MACOSX) 90 #if OS(MACOSX)
91 CTFontRef ctFont() const; 91 CTFontRef ctFont() const;
92 CGFontRef cgFont() const; 92 CGFontRef cgFont() const;
93 #endif 93 #endif
94 94
95 String fontFamilyName() const; 95 String fontFamilyName() const;
96 float size() const { return m_textSize; } 96 float size() const { return m_textSize; }
97 bool syntheticBold() const { return m_syntheticBold; } 97 bool syntheticBold() const { return m_syntheticBold; }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 int paintTextFlags() const { return m_paintTextFlags; } 138 int paintTextFlags() const { return m_paintTextFlags; }
139 #else 139 #else
140 static void setHinting(SkPaint::Hinting); 140 static void setHinting(SkPaint::Hinting);
141 static void setAutoHint(bool); 141 static void setAutoHint(bool);
142 static void setUseBitmaps(bool); 142 static void setUseBitmaps(bool);
143 static void setAntiAlias(bool); 143 static void setAntiAlias(bool);
144 static void setSubpixelRendering(bool); 144 static void setSubpixelRendering(bool);
145 #endif 145 #endif
146 146
147 private: 147 private:
148 bool static defaultUseSubpixelPositioning();
149 #if !OS(MACOSX) 148 #if !OS(MACOSX)
150 void querySystemForRenderStyle(bool useSkiaSubpixelPositioning); 149 void querySystemForRenderStyle();
151 #endif 150 #endif
152 151
153 RefPtr<SkTypeface> m_typeface; 152 RefPtr<SkTypeface> m_typeface;
154 #if !OS(WIN) 153 #if !OS(WIN)
155 CString m_family; 154 CString m_family;
156 #endif 155 #endif
157 156
158 public: 157 public:
159 float m_textSize; 158 float m_textSize;
160 bool m_syntheticBold; 159 bool m_syntheticBold;
161 bool m_syntheticItalic; 160 bool m_syntheticItalic;
162 FontOrientation m_orientation; 161 FontOrientation m_orientation;
163 private: 162 private:
164 #if !OS(MACOSX) 163 #if !OS(MACOSX)
165 FontRenderStyle m_style; 164 FontRenderStyle m_style;
166 #endif 165 #endif
167 166
168 mutable RefPtr<HarfBuzzFace> m_harfBuzzFace; 167 mutable RefPtr<HarfBuzzFace> m_harfBuzzFace;
169 bool m_isHashTableDeletedValue; 168 bool m_isHashTableDeletedValue;
170 #if OS(WIN) 169 #if OS(WIN)
171 int m_paintTextFlags; 170 int m_paintTextFlags;
172 bool m_useSubpixelPositioning;
173 unsigned m_minSizeForAntiAlias; 171 unsigned m_minSizeForAntiAlias;
174 float m_minSizeForSubpixel; 172 float m_minSizeForSubpixel;
175 #endif 173 #endif
176 }; 174 };
177 175
178 } // namespace blink 176 } // namespace blink
179 177
180 #endif // ifdef FontPlatformData_h 178 #endif // ifdef FontPlatformData_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/FontCache.cpp ('k') | third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698