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 10 matching lines...) Expand all Loading... |
21 BlockInfo() : fPicture(NULL), fPaint(NULL), fKey(NULL), fKeySize(0) {} | 21 BlockInfo() : fPicture(NULL), fPaint(NULL), fKey(NULL), fKeySize(0) {} |
22 ~BlockInfo() { SkSafeUnref(fPicture); SkDELETE(fPaint); SkDELETE_ARRAY(f
Key); } | 22 ~BlockInfo() { SkSafeUnref(fPicture); SkDELETE(fPaint); SkDELETE_ARRAY(f
Key); } |
23 | 23 |
24 // The picture owning the layer. If the owning picture is the top-most | 24 // The picture owning the layer. If the owning picture is the top-most |
25 // one (i.e., the picture for which this SkLayerInfo was created) then | 25 // one (i.e., the picture for which this SkLayerInfo was created) then |
26 // this pointer is NULL. If it is a nested picture then the pointer | 26 // this pointer is NULL. If it is a nested picture then the pointer |
27 // is non-NULL and owns a ref on the picture. | 27 // is non-NULL and owns a ref on the picture. |
28 const SkPicture* fPicture; | 28 const SkPicture* fPicture; |
29 // The device space bounds of this layer. | 29 // The device space bounds of this layer. |
30 SkRect fBounds; | 30 SkRect fBounds; |
| 31 // If not-empty, the optional bounds parameter passed in to the saveLaye
r |
| 32 // call. |
| 33 SkRect fSrcBounds; |
31 // The pre-matrix begins as the identity and accumulates the transforms | 34 // The pre-matrix begins as the identity and accumulates the transforms |
32 // of the containing SkPictures (if any). This matrix state has to be | 35 // of the containing SkPictures (if any). This matrix state has to be |
33 // part of the initial matrix during replay so that it will be | 36 // part of the initial matrix during replay so that it will be |
34 // preserved across setMatrix calls. | 37 // preserved across setMatrix calls. |
35 SkMatrix fPreMat; | 38 SkMatrix fPreMat; |
36 // The matrix state (in the leaf picture) in which this layer's draws | 39 // The matrix state (in the leaf picture) in which this layer's draws |
37 // must occur. It will/can be overridden by setMatrix calls in the | 40 // must occur. It will/can be overridden by setMatrix calls in the |
38 // layer itself. It does not include the translation needed to map the | 41 // layer itself. It does not include the translation needed to map the |
39 // layer's top-left point to the origin (which must be part of the | 42 // layer's top-left point to the origin (which must be part of the |
40 // initial matrix). | 43 // initial matrix). |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // incorporate the clip and matrix state into the key | 76 // incorporate the clip and matrix state into the key |
74 static SkPicture::AccelData::Key ComputeKey(); | 77 static SkPicture::AccelData::Key ComputeKey(); |
75 | 78 |
76 private: | 79 private: |
77 SkTArray<BlockInfo, true> fBlocks; | 80 SkTArray<BlockInfo, true> fBlocks; |
78 | 81 |
79 typedef SkPicture::AccelData INHERITED; | 82 typedef SkPicture::AccelData INHERITED; |
80 }; | 83 }; |
81 | 84 |
82 #endif // SkLayerInfo_DEFINED | 85 #endif // SkLayerInfo_DEFINED |
OLD | NEW |