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

Unified Diff: gm/fontcache.cpp

Issue 1933393002: Move SkTypeface to sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Restore deleted Android code. Created 4 years, 7 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 | « gm/dftext.cpp ('k') | gm/fontmgr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/fontcache.cpp
diff --git a/gm/fontcache.cpp b/gm/fontcache.cpp
index 30f8892c78f88c1a93ae71deade77dc8d6f061b5..c4af48930428fde367f21054b702ef3905537f7a 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;
};
« no previous file with comments | « gm/dftext.cpp ('k') | gm/fontmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698