diff options
author | bungeman <bungeman@google.com> | 2016-05-11 12:38:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-11 12:38:18 -0700 |
commit | 6296da736fbf40aae881650c239420f64e576c3f (patch) | |
tree | 5121ecf46ff7099d8eb66d2b2a4671d5ad94db89 /gm/fontcache.cpp | |
parent | c8699321b924c1f284df93cb29b86000c1d73c0a (diff) |
Move SkTypeface to sk_sp.
Review-Url: https://codereview.chromium.org/1933393002
Diffstat (limited to 'gm/fontcache.cpp')
-rw-r--r-- | gm/fontcache.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/gm/fontcache.cpp b/gm/fontcache.cpp index 30f8892c78..c4af489304 100644 --- a/gm/fontcache.cpp +++ b/gm/fontcache.cpp @@ -20,15 +20,7 @@ static SkScalar draw_string(SkCanvas* canvas, const SkString& text, SkScalar x, class FontCacheGM : public skiagm::GM { public: - FontCacheGM() { - fTypefaces[0] = nullptr; - fTypefaces[1] = nullptr; - } - - virtual ~FontCacheGM() { - SkSafeUnref(fTypefaces[0]); - SkSafeUnref(fTypefaces[1]); - } + FontCacheGM() {} protected: SkString onShortName() override { @@ -76,7 +68,7 @@ protected: } private: - SkTypeface* fTypefaces[2]; + sk_sp<SkTypeface> fTypefaces[2]; typedef GM INHERITED; }; |