Chromium Code Reviews| Index: src/gpu/batches/GrAADistanceFieldPathRenderer.h |
| diff --git a/src/gpu/batches/GrAADistanceFieldPathRenderer.h b/src/gpu/batches/GrAADistanceFieldPathRenderer.h |
| index 469aeeb981241bce1dd4a34e7440f5ef59d17988..55f49260545cd9c007d133a6430c7aa125be8f00 100755 |
| --- a/src/gpu/batches/GrAADistanceFieldPathRenderer.h |
| +++ b/src/gpu/batches/GrAADistanceFieldPathRenderer.h |
| @@ -33,13 +33,27 @@ private: |
| bool onDrawPath(const DrawPathArgs&) override; |
| struct PathData { |
| - struct Key { |
| + class Key { |
| + public: |
|
robertphillips
2015/11/19 19:03:28
Why do we need the default ctor ?
jvanverth1
2015/11/19 20:33:23
Added a comment. It's needed when allocating PathD
|
| + Key() : fStroke(SkStrokeRec::kFill_InitStyle) {} |
| + Key(uint32_t genID, uint32_t dim, const SkStrokeRec& stroke) |
| + : fGenID(genID) |
| + , fDimension(dim) |
| + , fStroke(stroke) { |
| + } |
| + |
| + bool operator==(const Key& other) const { |
| + return other.fGenID == fGenID && other.fDimension == fDimension && |
|
robertphillips
2015/11/19 19:03:28
tab this over ?
jvanverth1
2015/11/19 20:33:23
Done.
|
| + fStroke.hasEqualEffect(other.fStroke); |
| + } |
| + |
| + private: |
| uint32_t fGenID; |
| // rendered size for stored path (32x32 max, 64x64 max, 128x128 max) |
| uint32_t fDimension; |
| - bool operator==(const Key& other) const { |
| - return other.fGenID == fGenID && other.fDimension == fDimension; |
| - } |
| + // stroking information |
| + SkStrokeRec fStroke; |
|
robertphillips
2015/11/19 19:03:28
extra \n ?
jvanverth1
2015/11/19 20:33:23
Done.
|
| + |
| }; |
| Key fKey; |
| SkScalar fScale; |