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

Side by Side Diff: include/core/SkString.h

Issue 1490113005: Add config options to run different GPU APIs to dm and nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@commandbuffer-as-api-03-context-factory-glcontext-type
Patch Set: fix errorneous config handling Created 5 years 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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkString_DEFINED 10 #ifndef SkString_DEFINED
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 static Rec* RefRec(Rec*); 258 static Rec* RefRec(Rec*);
259 }; 259 };
260 260
261 /// Creates a new string and writes into it using a printf()-style format. 261 /// Creates a new string and writes into it using a printf()-style format.
262 SkString SkStringPrintf(const char* format, ...); 262 SkString SkStringPrintf(const char* format, ...);
263 263
264 // Specialized to take advantage of SkString's fast swap path. The unspecialized function is 264 // Specialized to take advantage of SkString's fast swap path. The unspecialized function is
265 // declared in SkTypes.h and called by SkTSort. 265 // declared in SkTypes.h and called by SkTSort.
266 template <> inline void SkTSwap(SkString& a, SkString& b) { 266 template <> inline void SkTSwap(SkString& a, SkString& b) {
267 a.swap(b); 267 a.swap(b);
268 } 268 }
Kimmo Kinnunen 2015/12/07 09:26:48 Added these (copied chromium base/strings/string_s
269 269
270 enum SkStrSplitResult {
scroggo 2015/12/07 13:27:52 Naming this "Result" makes me think this will be t
Kimmo Kinnunen 2015/12/08 09:07:51 Done.
271 // Strictly return all results. If the input is ",," and the separator is ', ' this will return
272 // an array of three empty strings.
273 kAll_SkStrSplitResult,
scroggo 2015/12/07 13:27:52 I don't find these names to be very descriptive. B
Kimmo Kinnunen 2015/12/08 09:07:51 I changed them to your suggestions. I don't neces
274
275 // Only nonempty results will be added to the results. Multiple separators w ill be
276 // coalesced. Separators at the beginning and end of the input will be ignor ed. If the input is
277 // ",," and the separator is ',', this will return an empty vector.
278 kNonEmpty_SkStrSplitResult
279 };
280
270 // Split str on any characters in delimiters into out. (Think, strtok with a sa ne API.) 281 // Split str on any characters in delimiters into out. (Think, strtok with a sa ne API.)
271 void SkStrSplit(const char* str, const char* delimiters, SkTArray<SkString>* out ); 282 void SkStrSplit(const char* str, const char* delimiters, SkStrSplitResult result Behavior,
283 SkTArray<SkString>* out);
284 inline void SkStrSplit(const char* str, const char* delimiters, SkTArray<SkStrin g>* out) {
285 SkStrSplit(str, delimiters, kNonEmpty_SkStrSplitResult, out);
286 }
272 287
273 #endif 288 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698