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

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

Issue 651723003: Require SK_DECLARE_STATIC_LAZY_PTR is used in global scope. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: safe unref Created 6 years, 2 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 | include/core/SkPathRef.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 * 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
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
OLDNEW
« no previous file with comments | « no previous file | include/core/SkPathRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698