From feb3c1a57faee39dc10ac904f6b215ba50e286b4 Mon Sep 17 00:00:00 2001 From: bungeman Date: Fri, 5 Aug 2016 06:51:50 -0700 Subject: Move to SkDataTable::MakeXXX and sk_sp. Change SkDataTable::NewXXX to SkDataTable::MakeXXX and return sk_sp. This updates users of SkDataTable to sk_sp as well. There do not appear to be any external users of these methods. Review-Url: https://codereview.chromium.org/2211143002 --- include/ports/SkFontConfigInterface.h | 2 +- include/ports/SkFontMgr_indirect.h | 2 +- include/ports/SkRemotableFontMgr.h | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'include/ports') diff --git a/include/ports/SkFontConfigInterface.h b/include/ports/SkFontConfigInterface.h index 536768a8bf..30fc8a35fb 100644 --- a/include/ports/SkFontConfigInterface.h +++ b/include/ports/SkFontConfigInterface.h @@ -111,7 +111,7 @@ public: // New APIS, which have default impls for now (which do nothing) - virtual SkDataTable* getFamilyNames() { return SkDataTable::NewEmpty(); } + virtual sk_sp getFamilyNames() { return SkDataTable::MakeEmpty(); } typedef SkRefCnt INHERITED; }; diff --git a/include/ports/SkFontMgr_indirect.h b/include/ports/SkFontMgr_indirect.h index d3f47cb82b..406a75a7ee 100644 --- a/include/ports/SkFontMgr_indirect.h +++ b/include/ports/SkFontMgr_indirect.h @@ -95,7 +95,7 @@ private: mutable SkTArray fDataCache; mutable SkMutex fDataCacheMutex; - mutable SkAutoTUnref fFamilyNames; + mutable sk_sp fFamilyNames; mutable SkOnce fFamilyNamesInitOnce; static void set_up_family_names(const SkFontMgr_Indirect* self); diff --git a/include/ports/SkRemotableFontMgr.h b/include/ports/SkRemotableFontMgr.h index ddc8e50a12..2e028cee26 100644 --- a/include/ports/SkRemotableFontMgr.h +++ b/include/ports/SkRemotableFontMgr.h @@ -61,10 +61,8 @@ public: * * The indexes may be used with getIndex(int) and * matchIndexStyle(int, SkFontStyle). - * - * The caller must unref() the returned object. */ - virtual SkDataTable* getFamilyNames() const = 0; + virtual sk_sp getFamilyNames() const = 0; /** * Returns all of the fonts with the given familyIndex. -- cgit v1.2.3