From fc296295257a9300098df56a1e3975580e13d329 Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Fri, 6 May 2011 13:53:47 +0000 Subject: Replace GrStringBuilder with SkString. First step in cleaning up the shader generator. Slight performance hit when creating a new shader (<10% of total shader gen time on my Windows box is spent in building our string before handing it to GL). Much of this can be recovered by better usage pattern of SkString in coming revisions. Review URL: http://codereview.appspot.com/4465053/ git-svn-id: http://skia.googlecode.com/svn/trunk@1266 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkString.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp index 49182ea77c..f461a7a44a 100644 --- a/src/core/SkString.cpp +++ b/src/core/SkString.cpp @@ -317,6 +317,15 @@ SkString& SkString::operator=(const SkString& src) { return *this; } +SkString& SkString::operator=(const char text[]) { + this->validate(); + + SkString tmp(text); + this->swap(tmp); + + return *this; +} + void SkString::reset() { this->validate(); -- cgit v1.2.3