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

Unified Diff: src/ports/SkFontMgr_fontconfig.cpp

Issue 2211143002: Move to SkDataTable::MakeXXX and sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use bare pointer for global. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ports/SkFontMgr_FontConfigInterface.cpp ('k') | src/ports/SkRemotableFontMgr_win_dw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_fontconfig.cpp
diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp
index 0336e5d921e6b02789089d7de151edb0212052c4..fd5f1b08304e4b6cc5a12168ef075696c3b08725 100644
--- a/src/ports/SkFontMgr_fontconfig.cpp
+++ b/src/ports/SkFontMgr_fontconfig.cpp
@@ -503,7 +503,7 @@ private:
class SkFontMgr_fontconfig : public SkFontMgr {
mutable SkAutoFcConfig fFC;
- SkAutoTUnref<SkDataTable> fFamilyNames;
+ sk_sp<SkDataTable> fFamilyNames;
SkTypeface_FreeType::Scanner fScanner;
class StyleSet : public SkFontStyleSet {
@@ -579,7 +579,7 @@ class SkFontMgr_fontconfig : public SkFontMgr {
return false;
}
- static SkDataTable* GetFamilyNames(FcConfig* fcconfig) {
+ static sk_sp<SkDataTable> GetFamilyNames(FcConfig* fcconfig) {
FCLocker lock;
SkTDArray<const char*> names;
@@ -613,8 +613,8 @@ class SkFontMgr_fontconfig : public SkFontMgr {
}
}
- return SkDataTable::NewCopyArrays((void const *const *)names.begin(),
- sizes.begin(), names.count());
+ return SkDataTable::MakeCopyArrays((void const *const *)names.begin(),
+ sizes.begin(), names.count());
}
static bool FindByFcPattern(SkTypeface* cached, void* ctx) {
« no previous file with comments | « src/ports/SkFontMgr_FontConfigInterface.cpp ('k') | src/ports/SkRemotableFontMgr_win_dw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698