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

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

Issue 546973004: Revert 181541 "Merge FontPlatformDataHarfBuzz and FontPlatformData headers" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 11 matching lines...) Expand all
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "platform/fonts/FontPlatformData.h" 32 #include "platform/fonts/harfbuzz/FontPlatformDataHarfBuzz.h"
33 33
34 #include "SkTypeface.h" 34 #include "SkTypeface.h"
35 #include "platform/fonts/harfbuzz/HarfBuzzFace.h" 35 #include "platform/fonts/harfbuzz/HarfBuzzFace.h"
36 #include "wtf/text/WTFString.h" 36 #include "wtf/text/WTFString.h"
37 37
38 namespace blink { 38 namespace blink {
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)
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 , m_useSubpixelPositioning(src.m_useSubpixelPositioning) 141 , m_useSubpixelPositioning(src.m_useSubpixelPositioning)
142 #endif 142 #endif
143 { 143 {
144 querySystemForRenderStyle(FontDescription::subpixelPositioning()); 144 querySystemForRenderStyle(FontDescription::subpixelPositioning());
145 } 145 }
146 146
147 FontPlatformData::~FontPlatformData() 147 FontPlatformData::~FontPlatformData()
148 { 148 {
149 } 149 }
150 150
151 const FontPlatformData& FontPlatformData::operator=(const FontPlatformData& src) 151 FontPlatformData& FontPlatformData::operator=(const FontPlatformData& src)
152 { 152 {
153 m_typeface = src.m_typeface; 153 m_typeface = src.m_typeface;
154 #if !OS(WIN) 154 #if !OS(WIN)
155 m_family = src.m_family; 155 m_family = src.m_family;
156 #endif 156 #endif
157 m_textSize = src.m_textSize; 157 m_textSize = src.m_textSize;
158 m_syntheticBold = src.m_syntheticBold; 158 m_syntheticBold = src.m_syntheticBold;
159 m_syntheticItalic = src.m_syntheticItalic; 159 m_syntheticItalic = src.m_syntheticItalic;
160 m_harfBuzzFace = nullptr; 160 m_harfBuzzFace = nullptr;
161 m_orientation = src.m_orientation; 161 m_orientation = src.m_orientation;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 && m_orientation == a.m_orientation 211 && m_orientation == a.m_orientation
212 && m_style == a.m_style 212 && m_style == a.m_style
213 && m_isHashTableDeletedValue == a.m_isHashTableDeletedValue; 213 && m_isHashTableDeletedValue == a.m_isHashTableDeletedValue;
214 } 214 }
215 215
216 bool FontPlatformData::isFixedPitch() const 216 bool FontPlatformData::isFixedPitch() const
217 { 217 {
218 return typeface() && typeface()->isFixedPitch(); 218 return typeface() && typeface()->isFixedPitch();
219 } 219 }
220 220
221 SkTypeface* FontPlatformData::typeface() const
222 {
223 return m_typeface.get();
224 }
225
226 HarfBuzzFace* FontPlatformData::harfBuzzFace() const 221 HarfBuzzFace* FontPlatformData::harfBuzzFace() const
227 { 222 {
228 if (!m_harfBuzzFace) 223 if (!m_harfBuzzFace)
229 m_harfBuzzFace = HarfBuzzFace::create(const_cast<FontPlatformData*>(this ), uniqueID()); 224 m_harfBuzzFace = HarfBuzzFace::create(const_cast<FontPlatformData*>(this ), uniqueID());
230 225
231 return m_harfBuzzFace.get(); 226 return m_harfBuzzFace.get();
232 } 227 }
233 228
234 } // namespace blink 229 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/fonts/harfbuzz/FontPlatformDataHarfBuzz.h ('k') | Source/platform/fonts/harfbuzz/HarfBuzzFaceCoreText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698