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

Side by Side Diff: src/fonts/SkFontMgr_indirect.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 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
« no previous file with comments | « src/fonts/SkFontMgr_fontconfig.cpp ('k') | src/fonts/SkGScalerContext.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 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkDataTable.h" 8 #include "SkDataTable.h"
9 #include "SkFontMgr.h" 9 #include "SkFontMgr.h"
10 #include "SkFontMgr_indirect.h" 10 #include "SkFontMgr_indirect.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return; 171 return;
172 } 172 }
173 familyName->set(fFamilyNames->atStr(index)); 173 familyName->set(fFamilyNames->atStr(index));
174 } 174 }
175 175
176 SkFontStyleSet* SkFontMgr_Indirect::onCreateStyleSet(int index) const { 176 SkFontStyleSet* SkFontMgr_Indirect::onCreateStyleSet(int index) const {
177 SkRemotableFontIdentitySet* set = fProxy->getIndex(index); 177 SkRemotableFontIdentitySet* set = fProxy->getIndex(index);
178 if (NULL == set) { 178 if (NULL == set) {
179 return NULL; 179 return NULL;
180 } 180 }
181 return SkNEW_ARGS(SkStyleSet_Indirect, (this, index, set)); 181 return new SkStyleSet_Indirect(this, index, set);
182 } 182 }
183 183
184 SkFontStyleSet* SkFontMgr_Indirect::onMatchFamily(const char familyName[]) const { 184 SkFontStyleSet* SkFontMgr_Indirect::onMatchFamily(const char familyName[]) const {
185 return SkNEW_ARGS(SkStyleSet_Indirect, (this, -1, fProxy->matchName(familyNa me))); 185 return new SkStyleSet_Indirect(this, -1, fProxy->matchName(familyName));
186 } 186 }
187 187
188 SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& i d) const { 188 SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& i d) const {
189 if (id.fDataId == SkFontIdentity::kInvalidDataId) { 189 if (id.fDataId == SkFontIdentity::kInvalidDataId) {
190 return NULL; 190 return NULL;
191 } 191 }
192 192
193 SkAutoMutexAcquire ama(fDataCacheMutex); 193 SkAutoMutexAcquire ama(fDataCacheMutex);
194 194
195 SkAutoTUnref<SkTypeface> dataTypeface; 195 SkAutoTUnref<SkTypeface> dataTypeface;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 face.reset(this->matchFamilyStyle(NULL, style)); 295 face.reset(this->matchFamilyStyle(NULL, style));
296 } 296 }
297 297
298 if (NULL == face.get()) { 298 if (NULL == face.get()) {
299 SkFontIdentity fontId = this->fProxy->matchIndexStyle(0, style); 299 SkFontIdentity fontId = this->fProxy->matchIndexStyle(0, style);
300 face.reset(this->createTypefaceFromFontId(fontId)); 300 face.reset(this->createTypefaceFromFontId(fontId));
301 } 301 }
302 302
303 return face.detach(); 303 return face.detach();
304 } 304 }
OLDNEW
« no previous file with comments | « src/fonts/SkFontMgr_fontconfig.cpp ('k') | src/fonts/SkGScalerContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698