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 1986253002: Rename SkDescriptor::equals to SkDescriptor::operator== (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: 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 | « src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp ('k') | no next file » | no next file with comments »
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
11 #include "GrGlyph.h" 11 #include "GrGlyph.h"
12 #include "GrTypes.h" 12 #include "GrTypes.h"
13 13
14 #include "SkDescriptor.h" 14 #include "SkDescriptor.h"
15 15
16 class SkGlyph; 16 class SkGlyph;
17 class SkPath; 17 class SkPath;
18 18
19 /* 19 /*
20 * Wrapper class to turn a font cache descriptor into a key 20 * Wrapper class to turn a font cache descriptor into a key
21 * for GrFontScaler-related lookups 21 * for GrFontScaler-related lookups
22 */ 22 */
23 class GrFontDescKey : public SkRefCnt { 23 class GrFontDescKey : public SkRefCnt {
24 public: 24 public:
25 explicit GrFontDescKey(const SkDescriptor& desc) : fDesc(desc), fHash(desc.g etChecksum()) {} 25 explicit GrFontDescKey(const SkDescriptor& desc) : fDesc(desc), fHash(desc.g etChecksum()) {}
26 26
27 uint32_t getHash() const { return fHash; } 27 uint32_t getHash() const { return fHash; }
28 28
29 bool operator==(const GrFontDescKey& rh) const { 29 bool operator==(const GrFontDescKey& rh) const {
30 return fHash == rh.fHash && fDesc.getDesc()->equals(*rh.fDesc.getDesc()) ; 30 return fHash == rh.fHash && *fDesc.getDesc() == *rh.fDesc.getDesc();
31 } 31 }
32 32
33 private: 33 private:
34 SkAutoDescriptor fDesc; 34 SkAutoDescriptor fDesc;
35 uint32_t fHash; 35 uint32_t fHash;
36 36
37 typedef SkRefCnt INHERITED; 37 typedef SkRefCnt INHERITED;
38 }; 38 };
39 39
40 /* 40 /*
(...skipping 19 matching lines...) Expand all
60 const SkGlyph& grToSkGlyph(GrGlyph::PackedID); 60 const SkGlyph& grToSkGlyph(GrGlyph::PackedID);
61 61
62 private: 62 private:
63 SkGlyphCache* fStrike; 63 SkGlyphCache* fStrike;
64 GrFontDescKey* fKey; 64 GrFontDescKey* fKey;
65 65
66 typedef SkRefCnt INHERITED; 66 typedef SkRefCnt INHERITED;
67 }; 67 };
68 68
69 #endif 69 #endif
OLDNEW
« no previous file with comments | « src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698