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

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

Issue 1930103003: remove SkWriteBuffer::reserve() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More dead code. Created 4 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
« no previous file with comments | « no previous file | src/core/SkPaint.cpp » ('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 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 25 matching lines...) Expand all
36 36
37 bool isCrossProcess() const { 37 bool isCrossProcess() const {
38 return SkToBool(fFlags & kCrossProcess_Flag); 38 return SkToBool(fFlags & kCrossProcess_Flag);
39 } 39 }
40 40
41 SkWriter32* getWriter32() { return &fWriter; } 41 SkWriter32* getWriter32() { return &fWriter; }
42 void reset(void* storage = NULL, size_t storageSize = 0) { 42 void reset(void* storage = NULL, size_t storageSize = 0) {
43 fWriter.reset(storage, storageSize); 43 fWriter.reset(storage, storageSize);
44 } 44 }
45 45
46 uint32_t* reserve(size_t size) { return fWriter.reserve(size); }
47
48 size_t bytesWritten() const { return fWriter.bytesWritten(); } 46 size_t bytesWritten() const { return fWriter.bytesWritten(); }
49 47
50 void writeByteArray(const void* data, size_t size); 48 void writeByteArray(const void* data, size_t size);
51 void writeDataAsByteArray(SkData* data) { this->writeByteArray(data->data(), data->size()); } 49 void writeDataAsByteArray(SkData* data) { this->writeByteArray(data->data(), data->size()); }
52 void writeBool(bool value); 50 void writeBool(bool value);
53 void writeScalar(SkScalar value); 51 void writeScalar(SkScalar value);
54 void writeScalarArray(const SkScalar* value, uint32_t count); 52 void writeScalarArray(const SkScalar* value, uint32_t count);
55 void writeInt(int32_t value); 53 void writeInt(int32_t value);
56 void writeIntArray(const int32_t* value, uint32_t count); 54 void writeIntArray(const int32_t* value, uint32_t count);
57 void writeUInt(uint32_t value); 55 void writeUInt(uint32_t value);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 SkBitmapHeap* fBitmapHeap; 113 SkBitmapHeap* fBitmapHeap;
116 SkRefCntSet* fTFSet; 114 SkRefCntSet* fTFSet;
117 115
118 SkAutoTUnref<SkPixelSerializer> fPixelSerializer; 116 SkAutoTUnref<SkPixelSerializer> fPixelSerializer;
119 117
120 // Only used if we do not have an fFactorySet 118 // Only used if we do not have an fFactorySet
121 SkTHashMap<SkString, uint32_t> fFlattenableDict; 119 SkTHashMap<SkString, uint32_t> fFlattenableDict;
122 }; 120 };
123 121
124 #endif // SkWriteBuffer_DEFINED 122 #endif // SkWriteBuffer_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698