| 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 |
| 11 #include "SkBigPicture.h" | 11 #include "SkBigPicture.h" |
| 12 #include "SkMatrix.h" |
| 13 #include "SkPaint.h" |
| 12 #include "SkTArray.h" | 14 #include "SkTArray.h" |
| 13 | 15 |
| 14 // This class stores information about the saveLayer/restore pairs found | 16 // This class stores information about the saveLayer/restore pairs found |
| 15 // within an SkPicture. It is used by Ganesh to perform layer hoisting. | 17 // within an SkPicture. It is used by Ganesh to perform layer hoisting. |
| 16 class SkLayerInfo : public SkBigPicture::AccelData { | 18 class SkLayerInfo : public SkBigPicture::AccelData { |
| 17 public: | 19 public: |
| 18 // Information about a given saveLayer/restore block in an SkPicture | 20 // Information about a given saveLayer/restore block in an SkPicture |
| 19 class BlockInfo { | 21 class BlockInfo { |
| 20 public: | 22 public: |
| 21 BlockInfo() : fPicture(nullptr), fPaint(nullptr), fKey(nullptr), fKeySiz
e(0) {} | 23 BlockInfo() : fPicture(nullptr), fPaint(nullptr), fKey(nullptr), fKeySiz
e(0) {} |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 return fBlocks[index]; | 78 return fBlocks[index]; |
| 77 } | 79 } |
| 78 | 80 |
| 79 private: | 81 private: |
| 80 SkTArray<BlockInfo, true> fBlocks; | 82 SkTArray<BlockInfo, true> fBlocks; |
| 81 | 83 |
| 82 typedef SkBigPicture::AccelData INHERITED; | 84 typedef SkBigPicture::AccelData INHERITED; |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 #endif // SkLayerInfo_DEFINED | 87 #endif // SkLayerInfo_DEFINED |
| OLD | NEW |