| 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; | |
| 34 // The pre-matrix begins as the identity and accumulates the transforms | 31 // The pre-matrix begins as the identity and accumulates the transforms |
| 35 // of the containing SkPictures (if any). This matrix state has to be | 32 // of the containing SkPictures (if any). This matrix state has to be |
| 36 // part of the initial matrix during replay so that it will be | 33 // part of the initial matrix during replay so that it will be |
| 37 // preserved across setMatrix calls. | 34 // preserved across setMatrix calls. |
| 38 SkMatrix fPreMat; | 35 SkMatrix fPreMat; |
| 39 // The matrix state (in the leaf picture) in which this layer's draws | 36 // The matrix state (in the leaf picture) in which this layer's draws |
| 40 // must occur. It will/can be overridden by setMatrix calls in the | 37 // must occur. It will/can be overridden by setMatrix calls in the |
| 41 // layer itself. It does not include the translation needed to map the | 38 // layer itself. It does not include the translation needed to map the |
| 42 // layer's top-left point to the origin (which must be part of the | 39 // layer's top-left point to the origin (which must be part of the |
| 43 // initial matrix). | 40 // initial matrix). |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // incorporate the clip and matrix state into the key | 73 // incorporate the clip and matrix state into the key |
| 77 static SkPicture::AccelData::Key ComputeKey(); | 74 static SkPicture::AccelData::Key ComputeKey(); |
| 78 | 75 |
| 79 private: | 76 private: |
| 80 SkTArray<BlockInfo, true> fBlocks; | 77 SkTArray<BlockInfo, true> fBlocks; |
| 81 | 78 |
| 82 typedef SkPicture::AccelData INHERITED; | 79 typedef SkPicture::AccelData INHERITED; |
| 83 }; | 80 }; |
| 84 | 81 |
| 85 #endif // SkLayerInfo_DEFINED | 82 #endif // SkLayerInfo_DEFINED |
| OLD | NEW |