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

Side by Side Diff: Source/platform/fonts/harfbuzz/FontPlatformDataHarfBuzz.cpp

Issue 556313002: Merge 181492 "[DirectWrite] Disable subpixel font positioning fo..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2125/
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 | Annotate | Revision Log
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 28 matching lines...) Expand all
39 39
40 FontPlatformData::FontPlatformData(WTF::HashTableDeletedValueType) 40 FontPlatformData::FontPlatformData(WTF::HashTableDeletedValueType)
41 : m_textSize(0) 41 : m_textSize(0)
42 , m_syntheticBold(false) 42 , m_syntheticBold(false)
43 , m_syntheticItalic(false) 43 , m_syntheticItalic(false)
44 , m_orientation(Horizontal) 44 , m_orientation(Horizontal)
45 , m_isHashTableDeletedValue(true) 45 , m_isHashTableDeletedValue(true)
46 #if OS(WIN) 46 #if OS(WIN)
47 , m_paintTextFlags(0) 47 , m_paintTextFlags(0)
48 , m_minSizeForAntiAlias(0) 48 , m_minSizeForAntiAlias(0)
49 , m_minSizeForSubpixel(0)
49 , m_useSubpixelPositioning(false) 50 , m_useSubpixelPositioning(false)
50 #endif 51 #endif
51 { 52 {
52 } 53 }
53 54
54 FontPlatformData::FontPlatformData() 55 FontPlatformData::FontPlatformData()
55 : m_textSize(0) 56 : m_textSize(0)
56 , m_syntheticBold(false) 57 , m_syntheticBold(false)
57 , m_syntheticItalic(false) 58 , m_syntheticItalic(false)
58 , m_orientation(Horizontal) 59 , m_orientation(Horizontal)
59 , m_isHashTableDeletedValue(false) 60 , m_isHashTableDeletedValue(false)
60 #if OS(WIN) 61 #if OS(WIN)
61 , m_paintTextFlags(0) 62 , m_paintTextFlags(0)
62 , m_minSizeForAntiAlias(0) 63 , m_minSizeForAntiAlias(0)
64 , m_minSizeForSubpixel(0)
63 , m_useSubpixelPositioning(false) 65 , m_useSubpixelPositioning(false)
64 #endif 66 #endif
65 { 67 {
66 } 68 }
67 69
68 FontPlatformData::FontPlatformData(float textSize, bool syntheticBold, bool synt heticItalic) 70 FontPlatformData::FontPlatformData(float textSize, bool syntheticBold, bool synt heticItalic)
69 : m_textSize(textSize) 71 : m_textSize(textSize)
70 , m_syntheticBold(syntheticBold) 72 , m_syntheticBold(syntheticBold)
71 , m_syntheticItalic(syntheticItalic) 73 , m_syntheticItalic(syntheticItalic)
72 , m_orientation(Horizontal) 74 , m_orientation(Horizontal)
73 , m_isHashTableDeletedValue(false) 75 , m_isHashTableDeletedValue(false)
74 #if OS(WIN) 76 #if OS(WIN)
75 , m_paintTextFlags(0) 77 , m_paintTextFlags(0)
76 , m_minSizeForAntiAlias(0) 78 , m_minSizeForAntiAlias(0)
79 , m_minSizeForSubpixel(0)
77 , m_useSubpixelPositioning(false) 80 , m_useSubpixelPositioning(false)
78 #endif 81 #endif
79 { 82 {
80 } 83 }
81 84
82 FontPlatformData::FontPlatformData(const FontPlatformData& src) 85 FontPlatformData::FontPlatformData(const FontPlatformData& src)
83 : m_typeface(src.m_typeface) 86 : m_typeface(src.m_typeface)
84 #if !OS(WIN) 87 #if !OS(WIN)
85 , m_family(src.m_family) 88 , m_family(src.m_family)
86 #endif 89 #endif
87 , m_textSize(src.m_textSize) 90 , m_textSize(src.m_textSize)
88 , m_syntheticBold(src.m_syntheticBold) 91 , m_syntheticBold(src.m_syntheticBold)
89 , m_syntheticItalic(src.m_syntheticItalic) 92 , m_syntheticItalic(src.m_syntheticItalic)
90 , m_orientation(src.m_orientation) 93 , m_orientation(src.m_orientation)
91 , m_style(src.m_style) 94 , m_style(src.m_style)
92 , m_harfBuzzFace(nullptr) 95 , m_harfBuzzFace(nullptr)
93 , m_isHashTableDeletedValue(false) 96 , m_isHashTableDeletedValue(false)
94 #if OS(WIN) 97 #if OS(WIN)
95 , m_paintTextFlags(src.m_paintTextFlags) 98 , m_paintTextFlags(src.m_paintTextFlags)
96 , m_minSizeForAntiAlias(src.m_minSizeForAntiAlias) 99 , m_minSizeForAntiAlias(src.m_minSizeForAntiAlias)
100 , m_minSizeForSubpixel(src.m_minSizeForSubpixel)
97 , m_useSubpixelPositioning(src.m_useSubpixelPositioning) 101 , m_useSubpixelPositioning(src.m_useSubpixelPositioning)
98 #endif 102 #endif
99 { 103 {
100 } 104 }
101 105
102 FontPlatformData::FontPlatformData(PassRefPtr<SkTypeface> tf, const char* family , float textSize, bool syntheticBold, bool syntheticItalic, FontOrientation orie ntation, bool subpixelTextPosition) 106 FontPlatformData::FontPlatformData(PassRefPtr<SkTypeface> tf, const char* family , float textSize, bool syntheticBold, bool syntheticItalic, FontOrientation orie ntation, bool subpixelTextPosition)
103 : m_typeface(tf) 107 : m_typeface(tf)
104 #if !OS(WIN) 108 #if !OS(WIN)
105 , m_family(family) 109 , m_family(family)
106 #endif 110 #endif
107 , m_textSize(textSize) 111 , m_textSize(textSize)
108 , m_syntheticBold(syntheticBold) 112 , m_syntheticBold(syntheticBold)
109 , m_syntheticItalic(syntheticItalic) 113 , m_syntheticItalic(syntheticItalic)
110 , m_orientation(orientation) 114 , m_orientation(orientation)
111 , m_isHashTableDeletedValue(false) 115 , m_isHashTableDeletedValue(false)
112 #if OS(WIN) 116 #if OS(WIN)
113 , m_paintTextFlags(0) 117 , m_paintTextFlags(0)
114 , m_minSizeForAntiAlias(0) 118 , m_minSizeForAntiAlias(0)
119 , m_minSizeForSubpixel(0)
115 , m_useSubpixelPositioning(subpixelTextPosition) 120 , m_useSubpixelPositioning(subpixelTextPosition)
116 #endif 121 #endif
117 { 122 {
118 querySystemForRenderStyle(subpixelTextPosition); 123 querySystemForRenderStyle(subpixelTextPosition);
119 } 124 }
120 125
121 FontPlatformData::FontPlatformData(const FontPlatformData& src, float textSize) 126 FontPlatformData::FontPlatformData(const FontPlatformData& src, float textSize)
122 : m_typeface(src.m_typeface) 127 : m_typeface(src.m_typeface)
123 #if !OS(WIN) 128 #if !OS(WIN)
124 , m_family(src.m_family) 129 , m_family(src.m_family)
125 #endif 130 #endif
126 , m_textSize(textSize) 131 , m_textSize(textSize)
127 , m_syntheticBold(src.m_syntheticBold) 132 , m_syntheticBold(src.m_syntheticBold)
128 , m_syntheticItalic(src.m_syntheticItalic) 133 , m_syntheticItalic(src.m_syntheticItalic)
129 , m_orientation(src.m_orientation) 134 , m_orientation(src.m_orientation)
130 , m_harfBuzzFace(nullptr) 135 , m_harfBuzzFace(nullptr)
131 , m_isHashTableDeletedValue(false) 136 , m_isHashTableDeletedValue(false)
132 #if OS(WIN) 137 #if OS(WIN)
133 , m_paintTextFlags(src.m_paintTextFlags) 138 , m_paintTextFlags(src.m_paintTextFlags)
134 , m_minSizeForAntiAlias(src.m_minSizeForAntiAlias) 139 , m_minSizeForAntiAlias(src.m_minSizeForAntiAlias)
140 , m_minSizeForSubpixel(src.m_minSizeForSubpixel)
135 , m_useSubpixelPositioning(src.m_useSubpixelPositioning) 141 , m_useSubpixelPositioning(src.m_useSubpixelPositioning)
136 #endif 142 #endif
137 { 143 {
138 querySystemForRenderStyle(FontDescription::subpixelPositioning()); 144 querySystemForRenderStyle(FontDescription::subpixelPositioning());
139 } 145 }
140 146
141 FontPlatformData::~FontPlatformData() 147 FontPlatformData::~FontPlatformData()
142 { 148 {
143 } 149 }
144 150
145 FontPlatformData& FontPlatformData::operator=(const FontPlatformData& src) 151 FontPlatformData& FontPlatformData::operator=(const FontPlatformData& src)
146 { 152 {
147 m_typeface = src.m_typeface; 153 m_typeface = src.m_typeface;
148 #if !OS(WIN) 154 #if !OS(WIN)
149 m_family = src.m_family; 155 m_family = src.m_family;
150 #endif 156 #endif
151 m_textSize = src.m_textSize; 157 m_textSize = src.m_textSize;
152 m_syntheticBold = src.m_syntheticBold; 158 m_syntheticBold = src.m_syntheticBold;
153 m_syntheticItalic = src.m_syntheticItalic; 159 m_syntheticItalic = src.m_syntheticItalic;
154 m_harfBuzzFace = nullptr; 160 m_harfBuzzFace = nullptr;
155 m_orientation = src.m_orientation; 161 m_orientation = src.m_orientation;
156 m_style = src.m_style; 162 m_style = src.m_style;
157 #if OS(WIN) 163 #if OS(WIN)
158 m_paintTextFlags = 0; 164 m_paintTextFlags = 0;
159 m_minSizeForAntiAlias = src.m_minSizeForAntiAlias; 165 m_minSizeForAntiAlias = src.m_minSizeForAntiAlias;
166 m_minSizeForSubpixel = src.m_minSizeForSubpixel;
160 m_useSubpixelPositioning = src.m_useSubpixelPositioning; 167 m_useSubpixelPositioning = src.m_useSubpixelPositioning;
161 #endif 168 #endif
162 169
163 return *this; 170 return *this;
164 } 171 }
165 172
166 #ifndef NDEBUG 173 #ifndef NDEBUG
167 String FontPlatformData::description() const 174 String FontPlatformData::description() const
168 { 175 {
169 return String(); 176 return String();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 220
214 HarfBuzzFace* FontPlatformData::harfBuzzFace() const 221 HarfBuzzFace* FontPlatformData::harfBuzzFace() const
215 { 222 {
216 if (!m_harfBuzzFace) 223 if (!m_harfBuzzFace)
217 m_harfBuzzFace = HarfBuzzFace::create(const_cast<FontPlatformData*>(this ), uniqueID()); 224 m_harfBuzzFace = HarfBuzzFace::create(const_cast<FontPlatformData*>(this ), uniqueID());
218 225
219 return m_harfBuzzFace.get(); 226 return m_harfBuzzFace.get();
220 } 227 }
221 228
222 } // namespace blink 229 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/fonts/harfbuzz/FontPlatformDataHarfBuzz.h ('k') | Source/platform/fonts/win/FontCacheSkiaWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698