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

Unified Diff: src/gpu/text/GrFontScaler.h

Issue 1982303002: Make GrFontScaler not be ref-counted (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: update INHERITED 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 | « no previous file | src/gpu/text/GrTextUtils.cpp » ('j') | src/gpu/text/GrTextUtils.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/text/GrFontScaler.h
diff --git a/src/gpu/text/GrFontScaler.h b/src/gpu/text/GrFontScaler.h
index f6b67706e39ba41a16646bcbbba16585aa264e4b..a2be7464a8bf45ea3ad61437230bbdb4d6927f04 100644
--- a/src/gpu/text/GrFontScaler.h
+++ b/src/gpu/text/GrFontScaler.h
@@ -43,10 +43,10 @@ private:
* The client is responsible for instantiating this. The instance is created
* for a specific font+size+matrix.
*/
-class GrFontScaler : public SkRefCnt {
+class GrFontScaler final : public SkNoncopyable {
public:
explicit GrFontScaler(SkGlyphCache* strike);
- virtual ~GrFontScaler();
+ ~GrFontScaler();
const GrFontDescKey* getKey();
GrMaskFormat getMaskFormat() const;
@@ -60,10 +60,12 @@ public:
const SkGlyph& grToSkGlyph(GrGlyph::PackedID);
private:
+ // The SkGlyphCache actually owns this GrFontScaler. The GrFontScaler is deleted when the
+ // SkGlyphCache is deleted.
SkGlyphCache* fStrike;
GrFontDescKey* fKey;
- typedef SkRefCnt INHERITED;
+ typedef SkNoncopyable INHERITED;
};
#endif
« no previous file with comments | « no previous file | src/gpu/text/GrTextUtils.cpp » ('j') | src/gpu/text/GrTextUtils.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698