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

Side by Side Diff: src/ports/SkFontConfigInterface_direct.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/pipe/SkGPipeWrite.cpp ('k') | src/ports/SkFontConfigTypeface.h » ('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 2009 Google Inc. 2 * Copyright 2009 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 /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */ 8 /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */
9 9
10 #include "SkBuffer.h" 10 #include "SkBuffer.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 SkTArray<FontIdentity>*) override; 126 SkTArray<FontIdentity>*) override;
127 127
128 private: 128 private:
129 SkMutex mutex_; 129 SkMutex mutex_;
130 }; 130 };
131 131
132 SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface(SkBase Mutex* mutex) { 132 SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface(SkBase Mutex* mutex) {
133 SkAutoMutexAcquire ac(mutex); 133 SkAutoMutexAcquire ac(mutex);
134 static SkFontConfigInterfaceDirect* singleton = NULL; 134 static SkFontConfigInterfaceDirect* singleton = NULL;
135 if (singleton == NULL) { 135 if (singleton == NULL) {
136 singleton = SkNEW(SkFontConfigInterfaceDirect); 136 singleton = new SkFontConfigInterfaceDirect;
137 } 137 }
138 return singleton; 138 return singleton;
139 } 139 }
140 140
141 /////////////////////////////////////////////////////////////////////////////// 141 ///////////////////////////////////////////////////////////////////////////////
142 142
143 // Returns the string from the pattern, or NULL 143 // Returns the string from the pattern, or NULL
144 static const char* get_name(FcPattern* pattern, const char field[], 144 static const char* get_name(FcPattern* pattern, const char field[],
145 int index = 0) { 145 int index = 0) {
146 const char* name; 146 const char* name;
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 FcPatternDestroy(pattern); 726 FcPatternDestroy(pattern);
727 727
728 SkTDArray<FcPattern*> trimmedMatches; 728 SkTDArray<FcPattern*> trimmedMatches;
729 for (int i = 0; i < count; ++i) { 729 for (int i = 0; i < count; ++i) {
730 const char* justName = find_just_name(get_name(match[i], FC_FILE)); 730 const char* justName = find_just_name(get_name(match[i], FC_FILE));
731 if (!is_lower(*justName)) { 731 if (!is_lower(*justName)) {
732 *trimmedMatches.append() = match[i]; 732 *trimmedMatches.append() = match[i];
733 } 733 }
734 } 734 }
735 735
736 SkFontStyleSet_FC* sset = SkNEW_ARGS(SkFontStyleSet_FC, 736 SkFontStyleSet_FC* sset = new SkFontStyleSet_FC (trimmedMatches.begin(), trimmedMatches.count());
737 (trimmedMatches.begin(),
738 trimmedMatches.count()));
739 #endif 737 #endif
740 return false; 738 return false;
741 } 739 }
OLDNEW
« no previous file with comments | « src/pipe/SkGPipeWrite.cpp ('k') | src/ports/SkFontConfigTypeface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698