aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2014-07-17 12:17:55 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-17 12:17:55 -0700
commit733418f91e4d90f4ec250d9a97120618a5a89b49 (patch)
treea72907f47936237dc061a9e19948b1760fcd40c0 /src/ports
parent04d53a5cd5ab609526ecf40159df01975ee2bbfd (diff)
Remove SkRefPtr.
R=mtklein@google.com, reed@google.com, bsalomon@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/393913002
Diffstat (limited to 'src/ports')
-rw-r--r--src/ports/SkFontConfigInterface_android.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ports/SkFontConfigInterface_android.cpp b/src/ports/SkFontConfigInterface_android.cpp
index 236f62b808..c4f1753eb7 100644
--- a/src/ports/SkFontConfigInterface_android.cpp
+++ b/src/ports/SkFontConfigInterface_android.cpp
@@ -53,7 +53,7 @@ typedef int32_t FamilyRecID;
// used to record our notion of the pre-existing fonts
struct FontRec {
- SkRefPtr<SkTypeface> fTypeface;
+ SkAutoTUnref<SkTypeface> fTypeface;
SkString fFileName;
SkTypeface::Style fStyle;
bool fIsValid;
@@ -115,8 +115,8 @@ private:
FallbackFontList* getCurrentLocaleFallbackFontList();
FallbackFontList* findFallbackFontList(const SkLanguage& lang, bool isOriginal = true);
- SkTArray<FontRec> fFonts;
- SkTArray<FamilyRec> fFontFamilies;
+ SkTArray<FontRec, true> fFonts;
+ SkTArray<FamilyRec, true> fFontFamilies;
SkTDict<FamilyRecID> fFamilyNameDict;
FamilyRecID fDefaultFamilyRecID;
@@ -163,7 +163,7 @@ SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface(SkBase
///////////////////////////////////////////////////////////////////////////////
-static bool has_font(const SkTArray<FontRec>& array, const SkString& filename) {
+static bool has_font(const SkTArray<FontRec, true>& array, const SkString& filename) {
for (int i = 0; i < array.count(); i++) {
if (array[i].fFileName == filename) {
return true;
@@ -503,7 +503,7 @@ SkTypeface* SkFontConfigInterfaceAndroid::getTypefaceForFontRec(FontRecID fontRe
}
// store the result for subsequent lookups
- fontRec.fTypeface = face;
+ fontRec.fTypeface.reset(face);
}
SkASSERT(face);
return face;