aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/text/GrFontScaler.h8
-rw-r--r--src/gpu/text/GrTextUtils.cpp2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/gpu/text/GrFontScaler.h b/src/gpu/text/GrFontScaler.h
index f6b67706e3..a2be7464a8 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
diff --git a/src/gpu/text/GrTextUtils.cpp b/src/gpu/text/GrTextUtils.cpp
index c368c214e1..da2b3e20db 100644
--- a/src/gpu/text/GrTextUtils.cpp
+++ b/src/gpu/text/GrTextUtils.cpp
@@ -572,7 +572,7 @@ uint32_t GrTextUtils::FilterTextFlags(const SkSurfaceProps& surfaceProps, const
static void glyph_cache_aux_proc(void* data) {
GrFontScaler* scaler = (GrFontScaler*)data;
- SkSafeUnref(scaler);
+ delete scaler;
}
GrFontScaler* GrTextUtils::GetGrFontScaler(SkGlyphCache* cache) {