| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkLayerInfo_DEFINED | 8 #ifndef SkLayerInfo_DEFINED |
| 9 #define SkLayerInfo_DEFINED | 9 #define SkLayerInfo_DEFINED |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // The index of the matching restore in the picture. | 49 // The index of the matching restore in the picture. |
| 50 size_t fRestoreOpID; | 50 size_t fRestoreOpID; |
| 51 // True if this saveLayer has at least one other saveLayer nested within
it. | 51 // True if this saveLayer has at least one other saveLayer nested within
it. |
| 52 // False otherwise. | 52 // False otherwise. |
| 53 bool fHasNestedLayers; | 53 bool fHasNestedLayers; |
| 54 // True if this saveLayer is nested within another. False otherwise. | 54 // True if this saveLayer is nested within another. False otherwise. |
| 55 bool fIsNested; | 55 bool fIsNested; |
| 56 // The variable length key for this saveLayer block. It stores the | 56 // The variable length key for this saveLayer block. It stores the |
| 57 // thread of drawPicture and saveLayer operation indices that lead to th
is | 57 // thread of drawPicture and saveLayer operation indices that lead to th
is |
| 58 // saveLayer (including its own op index). The BlockInfo owns this memor
y. | 58 // saveLayer (including its own op index). The BlockInfo owns this memor
y. |
| 59 unsigned* fKey; | 59 int* fKey; |
| 60 int fKeySize; // # of ints | 60 int fKeySize; // # of ints |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 SkLayerInfo() {} | 63 SkLayerInfo() {} |
| 64 | 64 |
| 65 BlockInfo& addBlock() { return fBlocks.push_back(); } | 65 BlockInfo& addBlock() { return fBlocks.push_back(); } |
| 66 | 66 |
| 67 int numBlocks() const { return fBlocks.count(); } | 67 int numBlocks() const { return fBlocks.count(); } |
| 68 | 68 |
| 69 const BlockInfo& block(int index) const { | 69 const BlockInfo& block(int index) const { |
| 70 SkASSERT(index < fBlocks.count()); | 70 SkASSERT(index < fBlocks.count()); |
| 71 | 71 |
| 72 return fBlocks[index]; | 72 return fBlocks[index]; |
| 73 } | 73 } |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 SkTArray<BlockInfo, true> fBlocks; | 76 SkTArray<BlockInfo, true> fBlocks; |
| 77 | 77 |
| 78 typedef SkBigPicture::AccelData INHERITED; | 78 typedef SkBigPicture::AccelData INHERITED; |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 #endif // SkLayerInfo_DEFINED | 81 #endif // SkLayerInfo_DEFINED |
| OLD | NEW |