Index: src/gpu/GrTextStrike_impl.h |
diff --git a/src/gpu/GrTextStrike_impl.h b/src/gpu/GrTextStrike_impl.h |
index 7f087fe05d18d07ef43b7e7979019bb895e1a1cc..130509c5d8bc5c3d3f3456a3972f3cb88b409f6b 100644 |
--- a/src/gpu/GrTextStrike_impl.h |
+++ b/src/gpu/GrTextStrike_impl.h |
@@ -13,8 +13,8 @@ |
class GrFontCache::Key { |
public: |
- Key(GrFontScaler* scaler) { |
- fFontScalerKey = scaler->getKey(); |
+ explicit Key(const GrKey* fontScalarKey) { |
+ fFontScalerKey = fontScalarKey; |
} |
intptr_t getHash() const { return fFontScalerKey->getHash(); } |
@@ -51,7 +51,7 @@ void GrFontCache::detachStrikeFromList(GrTextStrike* strike) { |
GrTextStrike* GrFontCache::getStrike(GrFontScaler* scaler) { |
this->validate(); |
- Key key(scaler); |
+ const Key key(scaler->getKey()); |
GrTextStrike* strike = fCache.find(key); |
if (NULL == strike) { |
strike = this->generateStrike(scaler, key); |