Index: include/gpu/GrGlyph.h |
diff --git a/include/gpu/GrGlyph.h b/include/gpu/GrGlyph.h |
index a7d834153f4407bb781e7a79721e0aa48be3b51b..a379144a4289067c572ded56d9462ecff5d01abd 100644 |
--- a/include/gpu/GrGlyph.h |
+++ b/include/gpu/GrGlyph.h |
@@ -10,6 +10,7 @@ |
#include "GrRect.h" |
#include "SkPath.h" |
+#include "SkChecksum.h" |
class GrPlot; |
@@ -72,7 +73,14 @@ struct GrGlyph { |
static inline uint16_t UnpackID(PackedID packed) { |
return (uint16_t)packed; |
} |
-}; |
+ static inline const GrGlyph::PackedID& GetKey(const GrGlyph& glyph) { |
+ return glyph.fPackedID; |
+ } |
+ |
+ static inline uint32_t Hash(GrGlyph::PackedID key) { |
+ return SkChecksum::Murmur3(&key, sizeof(key)); |
+ } |
+}; |
#endif |