aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkStringUtils.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-28 20:21:59 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-28 20:21:59 +0000
commit4991b8f23482afc1494fd17647421ce68de53331 (patch)
treecab68b2aa8bc017b30a904c6be057d33694c5bcb /src/core/SkStringUtils.cpp
parent85ec74ca543b13739db1ad55dedd7bdfae4ab1a6 (diff)
Added toString to SkDrawLooper-derived classes
Diffstat (limited to 'src/core/SkStringUtils.cpp')
-rw-r--r--src/core/SkStringUtils.cpp20
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;
+ }
+}
+