Chromium Code Reviews| Index: src/gpu/GrAtlasTextContext.h |
| diff --git a/src/gpu/GrAtlasTextContext.h b/src/gpu/GrAtlasTextContext.h |
| index 2f4779f03c7aa723ac58b09b54f325ebc119fe6c..04c8f029194adfbfe31169819e80c25b219771d5 100644 |
| --- a/src/gpu/GrAtlasTextContext.h |
| +++ b/src/gpu/GrAtlasTextContext.h |
| @@ -14,6 +14,7 @@ |
| #include "GrGeometryProcessor.h" |
| #include "SkDescriptor.h" |
| #include "GrMemoryPool.h" |
| +#include "SkMaskFilter.h" |
| #include "SkTextBlob.h" |
| #include "SkTInternalLList.h" |
| @@ -129,9 +130,7 @@ private: |
| SkMatrix fViewMatrix; |
| SkScalar fX; |
| SkScalar fY; |
| - SkPaint::Style fStyle; |
| int fRunCount; |
| - uint32_t fUniqueID; |
| GrMemoryPool* fPool; |
| // all glyph / vertex offsets are into these pools. |
| @@ -139,12 +138,32 @@ private: |
| GrGlyph::PackedID* fGlyphIDs; |
| Run* fRuns; |
| - static const uint32_t& GetKey(const BitmapTextBlob& blob) { |
| - return blob.fUniqueID; |
| + struct Key { |
| + Key() { |
| + memset(this, 0, sizeof(Key)); |
| + } |
| + uint32_t fUniqueID; |
| + SkPaint::Style fStyle; |
| + SkMaskFilter::BlurRec fBlurRec; |
|
bsalomon
2015/04/08 15:38:19
As we discussed, perhaps this should be a bit here
|
| + struct StrokeInfo { |
|
bsalomon
2015/04/08 15:38:19
similar here I think, style says its stroked, prob
|
| + SkScalar fFrameWidth; |
| + SkScalar fMiterLimit; |
| + uint8_t fStrokeJoin; |
| + }; |
| + StrokeInfo fStrokeInfo; |
| + |
| + bool operator==(const Key& other) const { |
| + return 0 == memcmp(this, &other, sizeof(Key)); |
| + } |
| + }; |
| + Key fKey; |
| + |
| + static const Key& GetKey(const BitmapTextBlob& blob) { |
| + return blob.fKey; |
| } |
| - static uint32_t Hash(const uint32_t& key) { |
| - return SkChecksum::Mix(key); |
| + static uint32_t Hash(const Key& key) { |
| + return SkChecksum::Murmur3(&key, sizeof(Key)); |
| } |
| void operator delete(void* p) { |