Chromium Code Reviews| Index: src/core/SkPictureContentInfo.h |
| diff --git a/src/core/SkPictureContentInfo.h b/src/core/SkPictureContentInfo.h |
| index cfeedcf48312317ca0c4684b7cb536c5c78aa297..63320ccd23a0e625104a9d35a791141b031c3740 100644 |
| --- a/src/core/SkPictureContentInfo.h |
| +++ b/src/core/SkPictureContentInfo.h |
| @@ -27,6 +27,12 @@ public: |
| void onAddPaintPtr(const SkPaint* paint); |
| void onDrawText() { ++fNumTexts; } |
| + void onSaveLayer(); |
| + void onSave(); |
| + void onRestore(); |
| + void rescindLastSave(); |
| + void rescindLastSaveLayer(); |
| + |
| void set(const SkPictureContentInfo& src); |
| void reset(); |
| void swap(SkPictureContentInfo* other); |
| @@ -49,6 +55,25 @@ private: |
| // This field is incremented every time a drawPath call is |
| // issued for a hairline stroked concave path. |
| int fNumAAHairlineConcavePaths; |
| + // These fields track the different layer flavors. fNumLayers is just |
| + // a count of all saveLayers, fNumNestingLayers is the number of layers |
| + // with a layer inside them, fNumLeafLayers is the number of layers with |
| + // no layer inside them. |
| + int fNumLayers; |
| + int fNumNestingLayers; |
| + int fNumLeafLayers; |
| + |
| + enum Flags { |
| + kSave_Flag = 0x1, |
| + kSaveLayer_Flag = 0x2, |
| + |
| + // Did the current save or saveLayer contain another saveLayer. |
| + // Percolated back down the save stack. |
| + kContainedSaveLayer_Flag = 0x4 |
| + }; |
| + |
| + // Stack of save vs saveLayer information to track nesting |
| + SkTDArray<int> fSaveStack; |
|
bsalomon
2014/08/11 20:07:38
I think we usually use uint32_t for bitfields.
robertphillips
2014/08/11 20:53:27
Done.
|
| }; |
| #endif |