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

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

Issue 240013005: read/write function_ptrs as just void*, and not as 'array of bytes' (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 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 SkWriteBuffer_DEFINED 9 #ifndef SkWriteBuffer_DEFINED
10 #define SkWriteBuffer_DEFINED 10 #define SkWriteBuffer_DEFINED
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void writeBool(bool value); 51 void writeBool(bool value);
52 void writeFixed(SkFixed value); 52 void writeFixed(SkFixed value);
53 void writeScalar(SkScalar value); 53 void writeScalar(SkScalar value);
54 void writeScalarArray(const SkScalar* value, uint32_t count); 54 void writeScalarArray(const SkScalar* value, uint32_t count);
55 void writeInt(int32_t value); 55 void writeInt(int32_t value);
56 void writeIntArray(const int32_t* value, uint32_t count); 56 void writeIntArray(const int32_t* value, uint32_t count);
57 void writeUInt(uint32_t value); 57 void writeUInt(uint32_t value);
58 void write32(int32_t value); 58 void write32(int32_t value);
59 void writeString(const char* value); 59 void writeString(const char* value);
60 void writeEncodedString(const void* value, size_t byteLength, SkPaint::TextE ncoding encoding); 60 void writeEncodedString(const void* value, size_t byteLength, SkPaint::TextE ncoding encoding);
61 void writeFunctionPtr(void* ptr) { this->writeByteArray(&ptr, sizeof(ptr)); } 61 void writeFunctionPtr(void* ptr) { fWriter.writePtr(ptr); }
62 62
63 void writeFlattenable(const SkFlattenable* flattenable); 63 void writeFlattenable(const SkFlattenable* flattenable);
64 void writeColor(const SkColor& color); 64 void writeColor(const SkColor& color);
65 void writeColorArray(const SkColor* color, uint32_t count); 65 void writeColorArray(const SkColor* color, uint32_t count);
66 void writePoint(const SkPoint& point); 66 void writePoint(const SkPoint& point);
67 void writePointArray(const SkPoint* point, uint32_t count); 67 void writePointArray(const SkPoint* point, uint32_t count);
68 void writeMatrix(const SkMatrix& matrix); 68 void writeMatrix(const SkMatrix& matrix);
69 void writeIRect(const SkIRect& rect); 69 void writeIRect(const SkIRect& rect);
70 void writeRect(const SkRect& rect); 70 void writeRect(const SkRect& rect);
71 void writeRegion(const SkRegion& region); 71 void writeRegion(const SkRegion& region);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 SkNamedFactorySet* fNamedFactorySet; 111 SkNamedFactorySet* fNamedFactorySet;
112 SkWriter32 fWriter; 112 SkWriter32 fWriter;
113 113
114 SkBitmapHeap* fBitmapHeap; 114 SkBitmapHeap* fBitmapHeap;
115 SkRefCntSet* fTFSet; 115 SkRefCntSet* fTFSet;
116 116
117 SkPicture::EncodeBitmap fBitmapEncoder; 117 SkPicture::EncodeBitmap fBitmapEncoder;
118 }; 118 };
119 119
120 #endif // SkWriteBuffer_DEFINED 120 #endif // SkWriteBuffer_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698