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

Side by Side Diff: include/core/SkFlattenableBuffers.h

Issue 15179008: Add buffer helper to read directly into SkString to avoid extra copying (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebasing Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | include/core/SkPaintOptionsAndroid.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 2012 Google Inc. 3 * Copyright 2012 Google Inc.
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 #ifndef SkFlattenableBuffers_DEFINED 9 #ifndef SkFlattenableBuffers_DEFINED
10 #define SkFlattenableBuffers_DEFINED 10 #define SkFlattenableBuffers_DEFINED
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // primitives 53 // primitives
54 virtual bool readBool() = 0; 54 virtual bool readBool() = 0;
55 virtual SkColor readColor() = 0; 55 virtual SkColor readColor() = 0;
56 virtual SkFixed readFixed() = 0; 56 virtual SkFixed readFixed() = 0;
57 virtual int32_t readInt() = 0; 57 virtual int32_t readInt() = 0;
58 virtual SkScalar readScalar() = 0; 58 virtual SkScalar readScalar() = 0;
59 virtual uint32_t readUInt() = 0; 59 virtual uint32_t readUInt() = 0;
60 virtual int32_t read32() = 0; 60 virtual int32_t read32() = 0;
61 61
62 // strings -- the caller is responsible for freeing the string contents 62 // strings -- the caller is responsible for freeing the string contents
63 virtual char* readString() = 0; 63 virtual void readString(SkString* string) = 0;
64 virtual void* readEncodedString(size_t* length, SkPaint::TextEncoding encodi ng) = 0; 64 virtual void* readEncodedString(size_t* length, SkPaint::TextEncoding encodi ng) = 0;
65 65
66 // common data structures 66 // common data structures
67 virtual SkFlattenable* readFlattenable() = 0; 67 virtual SkFlattenable* readFlattenable() = 0;
68 virtual void readPoint(SkPoint* point) = 0; 68 virtual void readPoint(SkPoint* point) = 0;
69 virtual void readMatrix(SkMatrix* matrix) = 0; 69 virtual void readMatrix(SkMatrix* matrix) = 0;
70 virtual void readIRect(SkIRect* rect) = 0; 70 virtual void readIRect(SkIRect* rect) = 0;
71 virtual void readRect(SkRect* rect) = 0; 71 virtual void readRect(SkRect* rect) = 0;
72 virtual void readRegion(SkRegion* region) = 0; 72 virtual void readRegion(SkRegion* region) = 0;
73 virtual void readPath(SkPath* path) = 0; 73 virtual void readPath(SkPath* path) = 0;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 bool persistTypeface() const { return (fFlags & kCrossProcess_Flag) != 0; } 166 bool persistTypeface() const { return (fFlags & kCrossProcess_Flag) != 0; }
167 167
168 protected: 168 protected:
169 // A helper function so that each subclass does not have to be a friend of S kFlattenable 169 // A helper function so that each subclass does not have to be a friend of S kFlattenable
170 void flattenObject(SkFlattenable* obj, SkFlattenableWriteBuffer& buffer); 170 void flattenObject(SkFlattenable* obj, SkFlattenableWriteBuffer& buffer);
171 171
172 uint32_t fFlags; 172 uint32_t fFlags;
173 }; 173 };
174 174
175 #endif 175 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkPaintOptionsAndroid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698