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

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

Issue 2290903002: Change (Pass)RefPtr<SkXxx> into sk_sp<SkXxx>. (Closed)
Patch Set: Rebasing... Created 4 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) 2011 Brent Fulgham 2 * Copyright (C) 2011 Brent Fulgham
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 , m_paintTextFlags(src.m_paintTextFlags) 124 , m_paintTextFlags(src.m_paintTextFlags)
125 , m_minSizeForAntiAlias(src.m_minSizeForAntiAlias) 125 , m_minSizeForAntiAlias(src.m_minSizeForAntiAlias)
126 , m_minSizeForSubpixel(src.m_minSizeForSubpixel) 126 , m_minSizeForSubpixel(src.m_minSizeForSubpixel)
127 #endif 127 #endif
128 { 128 {
129 #if OS(WIN) 129 #if OS(WIN)
130 querySystemForRenderStyle(); 130 querySystemForRenderStyle();
131 #endif 131 #endif
132 } 132 }
133 133
134 FontPlatformData::FontPlatformData(PassRefPtr<SkTypeface> tf, 134 FontPlatformData::FontPlatformData(sk_sp<SkTypeface> tf,
135 const char* family, float textSize, bool syntheticBold, 135 const char* family, float textSize, bool syntheticBold,
136 bool syntheticItalic, FontOrientation orientation) 136 bool syntheticItalic, FontOrientation orientation)
137 : m_typeface(tf) 137 : m_typeface(std::move(tf))
138 #if !OS(WIN) 138 #if !OS(WIN)
139 , m_family(family) 139 , m_family(family)
140 #endif 140 #endif
141 , m_textSize(textSize) 141 , m_textSize(textSize)
142 , m_syntheticBold(syntheticBold) 142 , m_syntheticBold(syntheticBold)
143 , m_syntheticItalic(syntheticItalic) 143 , m_syntheticItalic(syntheticItalic)
144 , m_orientation(orientation) 144 , m_orientation(orientation)
145 #if OS(LINUX) || OS(ANDROID) 145 #if OS(LINUX) || OS(ANDROID)
146 , m_style(FontRenderStyle::querySystem(m_family, m_textSize, m_typeface->sty le())) 146 , m_style(FontRenderStyle::querySystem(m_family, m_textSize, m_typeface->sty le()))
147 #endif 147 #endif
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 const size_t tableSize = m_typeface->getTableSize(tag); 340 const size_t tableSize = m_typeface->getTableSize(tag);
341 if (tableSize) { 341 if (tableSize) {
342 Vector<char> tableBuffer(tableSize); 342 Vector<char> tableBuffer(tableSize);
343 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]); 343 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]);
344 buffer = SharedBuffer::adoptVector(tableBuffer); 344 buffer = SharedBuffer::adoptVector(tableBuffer);
345 } 345 }
346 return buffer.release(); 346 return buffer.release();
347 } 347 }
348 348
349 } // namespace blink 349 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/FontPlatformData.h ('k') | third_party/WebKit/Source/platform/fonts/TextBlob.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698