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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/gpu/text/GrTextUtils.cpp » ('j') | src/gpu/text/GrTextUtils.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010 Google Inc. 2 * Copyright 2010 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrFontScaler_DEFINED 8 #ifndef GrFontScaler_DEFINED
9 #define GrFontScaler_DEFINED 9 #define GrFontScaler_DEFINED
10 10
(...skipping 25 matching lines...) Expand all
36 36
37 typedef SkRefCnt INHERITED; 37 typedef SkRefCnt INHERITED;
38 }; 38 };
39 39
40 /* 40 /*
41 * This is Gr's interface to the host platform's font scaler. 41 * This is Gr's interface to the host platform's font scaler.
42 * 42 *
43 * The client is responsible for instantiating this. The instance is created 43 * The client is responsible for instantiating this. The instance is created
44 * for a specific font+size+matrix. 44 * for a specific font+size+matrix.
45 */ 45 */
46 class GrFontScaler : public SkRefCnt { 46 class GrFontScaler final : public SkNoncopyable {
47 public: 47 public:
48 explicit GrFontScaler(SkGlyphCache* strike); 48 explicit GrFontScaler(SkGlyphCache* strike);
49 virtual ~GrFontScaler(); 49 ~GrFontScaler();
50 50
51 const GrFontDescKey* getKey(); 51 const GrFontDescKey* getKey();
52 GrMaskFormat getMaskFormat() const; 52 GrMaskFormat getMaskFormat() const;
53 GrMaskFormat getPackedGlyphMaskFormat(const SkGlyph&) const; 53 GrMaskFormat getPackedGlyphMaskFormat(const SkGlyph&) const;
54 bool getPackedGlyphBounds(const SkGlyph&, SkIRect* bounds); 54 bool getPackedGlyphBounds(const SkGlyph&, SkIRect* bounds);
55 bool getPackedGlyphImage(const SkGlyph&, int width, int height, int rowBytes , 55 bool getPackedGlyphImage(const SkGlyph&, int width, int height, int rowBytes ,
56 GrMaskFormat expectedMaskFormat, void* image); 56 GrMaskFormat expectedMaskFormat, void* image);
57 bool getPackedGlyphDFBounds(const SkGlyph&, SkIRect* bounds); 57 bool getPackedGlyphDFBounds(const SkGlyph&, SkIRect* bounds);
58 bool getPackedGlyphDFImage(const SkGlyph&, int width, int height, void* imag e); 58 bool getPackedGlyphDFImage(const SkGlyph&, int width, int height, void* imag e);
59 const SkPath* getGlyphPath(const SkGlyph&); 59 const SkPath* getGlyphPath(const SkGlyph&);
60 const SkGlyph& grToSkGlyph(GrGlyph::PackedID); 60 const SkGlyph& grToSkGlyph(GrGlyph::PackedID);
61 61
62 private: 62 private:
63 // The SkGlyphCache actually owns this GrFontScaler. The GrFontScaler is del eted when the
64 // SkGlyphCache is deleted.
63 SkGlyphCache* fStrike; 65 SkGlyphCache* fStrike;
64 GrFontDescKey* fKey; 66 GrFontDescKey* fKey;
65 67
66 typedef SkRefCnt INHERITED; 68 typedef SkNoncopyable INHERITED;
67 }; 69 };
68 70
69 #endif 71 #endif
OLDNEW
« 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