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