| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 void* operator new(size_t size) { return sk_malloc_throw(size); } | 209 void* operator new(size_t size) { return sk_malloc_throw(size); } |
| 210 void* operator new(size_t, void* p) { return p; } | 210 void* operator new(size_t, void* p) { return p; } |
| 211 void operator delete(void* p) { sk_free(p); } | 211 void operator delete(void* p) { sk_free(p); } |
| 212 | 212 |
| 213 // Called the first time someone calls NewEmpty to initialize the singleton. | 213 // Called the first time someone calls NewEmpty to initialize the singleton. |
| 214 friend SkData* sk_new_empty_data(); | 214 friend SkData* sk_new_empty_data(); |
| 215 | 215 |
| 216 // shared internal factory | 216 // shared internal factory |
| 217 static sk_sp<SkData> PrivateNewWithCopy(const void* srcOrNull, size_t length
); | 217 static sk_sp<SkData> PrivateNewWithCopy(const void* srcOrNull, size_t length
); |
| 218 | 218 |
| 219 static void DummyReleaseProc(const void*, void*) {} | 219 static void DummyReleaseProc(const void*, void*); // {} |
| 220 | 220 |
| 221 typedef SkRefCnt INHERITED; | 221 typedef SkRefCnt INHERITED; |
| 222 }; | 222 }; |
| 223 | 223 |
| 224 #ifdef SK_SUPPORT_LEGACY_DATA_FACTORIES | 224 #ifdef SK_SUPPORT_LEGACY_DATA_FACTORIES |
| 225 /** Typedef of SkAutoTUnref<SkData> for automatically unref-ing a SkData. */ | 225 /** Typedef of SkAutoTUnref<SkData> for automatically unref-ing a SkData. */ |
| 226 typedef SkAutoTUnref<SkData> SkAutoDataUnref; | 226 typedef SkAutoTUnref<SkData> SkAutoDataUnref; |
| 227 #endif | 227 #endif |
| 228 | 228 |
| 229 #endif | 229 #endif |
| OLD | NEW |