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

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: Created 4 years, 12 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 | « gyp/flags.gyp ('k') | include/gpu/gl/SkNullGLContext.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 /* 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
269 269
270 enum SkStrSplitMode {
271 // Strictly return all results. If the input is ",," and the separator is ', ' this will return
272 // an array of three empty strings.
273 kStrict_SkStrSplitMode,
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 kCoalesce_SkStrSplitMode
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, SkStrSplitMode splitMod e,
283 SkTArray<SkString>* out);
284 inline void SkStrSplit(const char* str, const char* delimiters, SkTArray<SkStrin g>* out) {
285 SkStrSplit(str, delimiters, kCoalesce_SkStrSplitMode, out);
286 }
272 287
273 #endif 288 #endif
OLDNEW
« no previous file with comments | « gyp/flags.gyp ('k') | include/gpu/gl/SkNullGLContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698