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

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

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/core/SkAdvancedTypefaceMetrics.h ('k') | src/core/SkColorTable.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 #include "SkAdvancedTypefaceMetrics.h" 10 #include "SkAdvancedTypefaceMetrics.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 243 }
244 } 244 }
245 if (curRange->fStartId == lastIndex) { 245 if (curRange->fStartId == lastIndex) {
246 SkASSERT(prevRange); 246 SkASSERT(prevRange);
247 SkASSERT(prevRange->fNext->fStartId == lastIndex); 247 SkASSERT(prevRange->fNext->fStartId == lastIndex);
248 prevRange->fNext.free(); 248 prevRange->fNext.free();
249 } else { 249 } else {
250 finishRange(curRange, lastIndex - 1, 250 finishRange(curRange, lastIndex - 1,
251 SkAdvancedTypefaceMetrics::WidthRange::kRange); 251 SkAdvancedTypefaceMetrics::WidthRange::kRange);
252 } 252 }
253 return result.detach(); 253 return result.release();
254 } 254 }
255 255
256 // Make AdvanceMetric template functions available for linking with typename 256 // Make AdvanceMetric template functions available for linking with typename
257 // WidthRange and VerticalAdvanceRange. 257 // WidthRange and VerticalAdvanceRange.
258 #if defined(SK_BUILD_FOR_WIN) 258 #if defined(SK_BUILD_FOR_WIN)
259 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( 259 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData(
260 HDC hdc, 260 HDC hdc,
261 int num_glyphs, 261 int num_glyphs,
262 const uint32_t* subsetGlyphIDs, 262 const uint32_t* subsetGlyphIDs,
263 uint32_t subsetGlyphIDsLength, 263 uint32_t subsetGlyphIDsLength,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 308
309 // additional declaration needed for testing with a face of an unknown type 309 // additional declaration needed for testing with a face of an unknown type
310 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( 310 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData(
311 void* fontData, 311 void* fontData,
312 int num_glyphs, 312 int num_glyphs,
313 const uint32_t* subsetGlyphIDs, 313 const uint32_t* subsetGlyphIDs,
314 uint32_t subsetGlyphIDsLength, 314 uint32_t subsetGlyphIDsLength,
315 bool (*getAdvance)(void* fontData, int gId, int16_t* data)); 315 bool (*getAdvance)(void* fontData, int gId, int16_t* data));
316 316
317 } // namespace skia_advanced_typeface_metrics_utils 317 } // namespace skia_advanced_typeface_metrics_utils
OLDNEW
« no previous file with comments | « src/core/SkAdvancedTypefaceMetrics.h ('k') | src/core/SkColorTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698