OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkData_DEFINED | 8 #ifndef SkData_DEFINED |
9 #define SkData_DEFINED | 9 #define SkData_DEFINED |
10 | 10 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 void* fPtr; | 164 void* fPtr; |
165 size_t fSize; | 165 size_t fSize; |
166 | 166 |
167 SkData(const void* ptr, size_t size, ReleaseProc, void* context); | 167 SkData(const void* ptr, size_t size, ReleaseProc, void* context); |
168 SkData(size_t size); // inplace new/delete | 168 SkData(size_t size); // inplace new/delete |
169 virtual ~SkData(); | 169 virtual ~SkData(); |
170 | 170 |
171 virtual void internal_dispose() const SK_OVERRIDE; | 171 virtual void internal_dispose() const SK_OVERRIDE; |
172 | 172 |
173 // Called the first time someone calls NewEmpty to initialize the singleton. | 173 // Called the first time someone calls NewEmpty to initialize the singleton. |
174 static SkData* NewEmptyImpl(); | 174 friend SkData* sk_new_empty_data(); |
175 static void DeleteEmpty(SkData*); | |
176 | 175 |
177 // shared internal factory | 176 // shared internal factory |
178 static SkData* PrivateNewWithCopy(const void* srcOrNull, size_t length); | 177 static SkData* PrivateNewWithCopy(const void* srcOrNull, size_t length); |
179 | 178 |
180 typedef SkRefCnt INHERITED; | 179 typedef SkRefCnt INHERITED; |
181 }; | 180 }; |
182 | 181 |
183 /** Typedef of SkAutoTUnref<SkData> for automatically unref-ing a SkData. */ | 182 /** Typedef of SkAutoTUnref<SkData> for automatically unref-ing a SkData. */ |
184 typedef SkAutoTUnref<SkData> SkAutoDataUnref; | 183 typedef SkAutoTUnref<SkData> SkAutoDataUnref; |
185 | 184 |
186 #endif | 185 #endif |
OLD | NEW |