aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-21 16:17:14 +0000
committerGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-21 16:17:14 +0000
commit7768751b8bec9e50fcbdad67b82e1962e71c3eb9 (patch)
treeebff6ac255d6e43a742873a36efea557c272c4f3 /include
parenta55e48d6ef67daa90d17731b49d45b0ac94dcc34 (diff)
Add buffer helper to read directly into SkString to avoid extra copying
R=reed@google.com Review URL: https://codereview.chromium.org/15179008 git-svn-id: http://skia.googlecode.com/svn/trunk@9218 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/core/SkFlattenableBuffers.h2
-rw-r--r--include/core/SkPaintOptionsAndroid.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/include/core/SkFlattenableBuffers.h b/include/core/SkFlattenableBuffers.h
index f5b853c5ac..03c03f3877 100644
--- a/include/core/SkFlattenableBuffers.h
+++ b/include/core/SkFlattenableBuffers.h
@@ -60,7 +60,7 @@ public:
virtual int32_t read32() = 0;
// strings -- the caller is responsible for freeing the string contents
- virtual char* readString() = 0;
+ virtual void readString(SkString* string) = 0;
virtual void* readEncodedString(size_t* length, SkPaint::TextEncoding encoding) = 0;
// common data structures
diff --git a/include/core/SkPaintOptionsAndroid.h b/include/core/SkPaintOptionsAndroid.h
index de2b281f21..23e3d0d390 100644
--- a/include/core/SkPaintOptionsAndroid.h
+++ b/include/core/SkPaintOptionsAndroid.h
@@ -27,6 +27,7 @@ class SkFlattenableWriteBuffer;
class SkLanguage {
public:
SkLanguage() { }
+ SkLanguage(const SkString& tag) : fTag(tag) { }
SkLanguage(const char* tag) : fTag(tag) { }
SkLanguage(const char* tag, size_t len) : fTag(tag, len) { }
SkLanguage(const SkLanguage& b) : fTag(b.fTag) { }