diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-28 20:21:59 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-28 20:21:59 +0000 |
commit | 4991b8f23482afc1494fd17647421ce68de53331 (patch) | |
tree | cab68b2aa8bc017b30a904c6be057d33694c5bcb /src/core/SkStringUtils.cpp | |
parent | 85ec74ca543b13739db1ad55dedd7bdfae4ab1a6 (diff) |
Added toString to SkDrawLooper-derived classes
https://codereview.appspot.com/7195054/
git-svn-id: http://skia.googlecode.com/svn/trunk@7422 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkStringUtils.cpp')
-rw-r--r-- | src/core/SkStringUtils.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core/SkStringUtils.cpp b/src/core/SkStringUtils.cpp new file mode 100644 index 0000000000..689a6eecaf --- /dev/null +++ b/src/core/SkStringUtils.cpp @@ -0,0 +1,20 @@ +/* + * Copyright 2013 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "SkString.h" +#include "SkStringUtils.h" + +void SkAddFlagToString(SkString* string, bool flag, const char* flagStr, bool* needSeparator) { + if (flag) { + if (*needSeparator) { + string->append("|"); + } + string->append(flagStr); + *needSeparator = true; + } +} + |