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

Side by Side Diff: src/core/SkAdvancedTypefaceMetrics.h

Issue 1809733002: detach -> release (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) Created 4 years, 9 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 | « src/codec/SkWebpCodec.cpp ('k') | src/core/SkAdvancedTypefaceMetrics.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 9
10 #ifndef SkAdvancedTypefaceMetrics_DEFINED 10 #ifndef SkAdvancedTypefaceMetrics_DEFINED
(...skipping 17 matching lines...) Expand all
28 T* get() const { return fPtr; } 28 T* get() const { return fPtr; }
29 T* operator->() const { return fPtr; } 29 T* operator->() const { return fPtr; }
30 30
31 void reset(T* ptr) { 31 void reset(T* ptr) {
32 if (ptr != fPtr) { 32 if (ptr != fPtr) {
33 delete fPtr; 33 delete fPtr;
34 fPtr = ptr; 34 fPtr = ptr;
35 } 35 }
36 } 36 }
37 void free() { this->reset(nullptr); } 37 void free() { this->reset(nullptr); }
38 T* detach() { 38 T* release() {
39 T* ptr = fPtr; 39 T* ptr = fPtr;
40 fPtr = nullptr; 40 fPtr = nullptr;
41 return ptr; 41 return ptr;
42 } 42 }
43 43
44 private: 44 private:
45 T* fPtr; 45 T* fPtr;
46 }; 46 };
47 47
48 /** \class SkAdvancedTypefaceMetrics 48 /** \class SkAdvancedTypefaceMetrics
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 SkAdvancedTypefaceMetrics::AdvanceMetric<Data>* getAdvanceData( 184 SkAdvancedTypefaceMetrics::AdvanceMetric<Data>* getAdvanceData(
185 FontHandle fontHandle, 185 FontHandle fontHandle,
186 int num_glyphs, 186 int num_glyphs,
187 const uint32_t* glyphIDs, 187 const uint32_t* glyphIDs,
188 uint32_t glyphIDsCount, 188 uint32_t glyphIDsCount,
189 bool (*getAdvance)(FontHandle fontHandle, int gId, Data* data)); 189 bool (*getAdvance)(FontHandle fontHandle, int gId, Data* data));
190 190
191 } // namespace skia_advanced_typeface_metrics_utils 191 } // namespace skia_advanced_typeface_metrics_utils
192 192
193 #endif 193 #endif
OLDNEW
« no previous file with comments | « src/codec/SkWebpCodec.cpp ('k') | src/core/SkAdvancedTypefaceMetrics.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698