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

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

Issue 2448593002: Remove SkAutoTUnref and SkAutoTDelete from public includes. (Closed)
Patch Set: And Vulcan. Created 4 years, 1 month 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 | « include/core/SkPictureRecorder.h ('k') | include/gpu/GrCaps.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 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 bool writeToStream(SkWStream*); 127 bool writeToStream(SkWStream*);
128 void writeToMemory(void* dst) { fWriter.flatten(dst); } 128 void writeToMemory(void* dst) { fWriter.flatten(dst); }
129 129
130 SkFactorySet* setFactoryRecorder(SkFactorySet*); 130 SkFactorySet* setFactoryRecorder(SkFactorySet*);
131 SkRefCntSet* setTypefaceRecorder(SkRefCntSet*); 131 SkRefCntSet* setTypefaceRecorder(SkRefCntSet*);
132 132
133 /** 133 /**
134 * Set an SkPixelSerializer to store an encoded representation of pixels, 134 * Set an SkPixelSerializer to store an encoded representation of pixels,
135 * e.g. SkBitmaps. 135 * e.g. SkBitmaps.
136 * 136 *
137 * Calls ref() on the serializer.
138 *
139 * TODO: Encode SkImage pixels as well. 137 * TODO: Encode SkImage pixels as well.
140 */ 138 */
141 void setPixelSerializer(SkPixelSerializer*); 139 void setPixelSerializer(sk_sp<SkPixelSerializer>);
142 SkPixelSerializer* getPixelSerializer() const { return fPixelSerializer; } 140 SkPixelSerializer* getPixelSerializer() const { return fPixelSerializer.get( ); }
143 141
144 private: 142 private:
145 const uint32_t fFlags; 143 const uint32_t fFlags;
146 SkFactorySet* fFactorySet; 144 SkFactorySet* fFactorySet;
147 SkWriter32 fWriter; 145 SkWriter32 fWriter;
148 146
149 SkRefCntSet* fTFSet; 147 SkRefCntSet* fTFSet;
150 148
151 SkAutoTUnref<SkPixelSerializer> fPixelSerializer; 149 sk_sp<SkPixelSerializer> fPixelSerializer;
152 150
153 // Only used if we do not have an fFactorySet 151 // Only used if we do not have an fFactorySet
154 SkTHashMap<SkString, uint32_t> fFlattenableDict; 152 SkTHashMap<SkString, uint32_t> fFlattenableDict;
155 }; 153 };
156 154
157 #endif // SkWriteBuffer_DEFINED 155 #endif // SkWriteBuffer_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkPictureRecorder.h ('k') | include/gpu/GrCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698