OLD | NEW |
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 fWriter.reset(storage, storageSize); | 44 fWriter.reset(storage, storageSize); |
45 } | 45 } |
46 | 46 |
47 uint32_t* reserve(size_t size) { return fWriter.reserve(size); } | 47 uint32_t* reserve(size_t size) { return fWriter.reserve(size); } |
48 | 48 |
49 size_t bytesWritten() const { return fWriter.bytesWritten(); } | 49 size_t bytesWritten() const { return fWriter.bytesWritten(); } |
50 | 50 |
51 void writeByteArray(const void* data, size_t size); | 51 void writeByteArray(const void* data, size_t size); |
52 void writeDataAsByteArray(SkData* data) { this->writeByteArray(data->data(),
data->size()); } | 52 void writeDataAsByteArray(SkData* data) { this->writeByteArray(data->data(),
data->size()); } |
53 void writeBool(bool value); | 53 void writeBool(bool value); |
54 void writeFixed(SkFixed value); | |
55 void writeScalar(SkScalar value); | 54 void writeScalar(SkScalar value); |
56 void writeScalarArray(const SkScalar* value, uint32_t count); | 55 void writeScalarArray(const SkScalar* value, uint32_t count); |
57 void writeInt(int32_t value); | 56 void writeInt(int32_t value); |
58 void writeIntArray(const int32_t* value, uint32_t count); | 57 void writeIntArray(const int32_t* value, uint32_t count); |
59 void writeUInt(uint32_t value); | 58 void writeUInt(uint32_t value); |
60 void write32(int32_t value); | 59 void write32(int32_t value); |
61 void writeString(const char* value); | 60 void writeString(const char* value); |
62 void writeEncodedString(const void* value, size_t byteLength, SkPaint::TextE
ncoding encoding); | 61 void writeEncodedString(const void* value, size_t byteLength, SkPaint::TextE
ncoding encoding); |
63 void writeFunctionPtr(void* ptr) { fWriter.writePtr(ptr); } | 62 void writeFunctionPtr(void* ptr) { fWriter.writePtr(ptr); } |
64 | 63 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 SkNamedFactorySet* fNamedFactorySet; | 117 SkNamedFactorySet* fNamedFactorySet; |
119 SkWriter32 fWriter; | 118 SkWriter32 fWriter; |
120 | 119 |
121 SkBitmapHeap* fBitmapHeap; | 120 SkBitmapHeap* fBitmapHeap; |
122 SkRefCntSet* fTFSet; | 121 SkRefCntSet* fTFSet; |
123 | 122 |
124 SkAutoTUnref<SkPixelSerializer> fPixelSerializer; | 123 SkAutoTUnref<SkPixelSerializer> fPixelSerializer; |
125 }; | 124 }; |
126 | 125 |
127 #endif // SkWriteBuffer_DEFINED | 126 #endif // SkWriteBuffer_DEFINED |
OLD | NEW |