| 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 #include "GrPictureUtils.h" | 8 #include "GrPictureUtils.h" |
| 9 | 9 |
| 10 #include "SkPaintPriv.h" | 10 #include "SkPaintPriv.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 GrAccelData::SaveLayerInfo& dst = fAccelData->addSaveLayerInfo(); | 120 GrAccelData::SaveLayerInfo& dst = fAccelData->addSaveLayerInfo(); |
| 121 | 121 |
| 122 // If src.fPicture is NULL the layer is in dp.picture; otherwise | 122 // If src.fPicture is NULL the layer is in dp.picture; otherwise |
| 123 // it belongs to a sub-picture. | 123 // it belongs to a sub-picture. |
| 124 dst.fPicture = src.fPicture ? src.fPicture : static_cast<const SkPic
ture*>(dp.picture); | 124 dst.fPicture = src.fPicture ? src.fPicture : static_cast<const SkPic
ture*>(dp.picture); |
| 125 dst.fPicture->ref(); | 125 dst.fPicture->ref(); |
| 126 dst.fBounds = newClip; | 126 dst.fBounds = newClip; |
| 127 dst.fLocalMat = src.fLocalMat; | 127 dst.fLocalMat = src.fLocalMat; |
| 128 dst.fPreMat = src.fPreMat; | 128 dst.fPreMat = src.fPreMat; |
| 129 dst.fPreMat.preConcat(*fCTM); | 129 dst.fPreMat.postConcat(*fCTM); |
| 130 if (src.fPaint) { | 130 if (src.fPaint) { |
| 131 dst.fPaint = SkNEW_ARGS(SkPaint, (*src.fPaint)); | 131 dst.fPaint = SkNEW_ARGS(SkPaint, (*src.fPaint)); |
| 132 } | 132 } |
| 133 dst.fSaveLayerOpID = src.fSaveLayerOpID; | 133 dst.fSaveLayerOpID = src.fSaveLayerOpID; |
| 134 dst.fRestoreOpID = src.fRestoreOpID; | 134 dst.fRestoreOpID = src.fRestoreOpID; |
| 135 dst.fHasNestedLayers = src.fHasNestedLayers; | 135 dst.fHasNestedLayers = src.fHasNestedLayers; |
| 136 dst.fIsNested = fSaveLayersInStack > 0 || src.fIsNested; | 136 dst.fIsNested = fSaveLayersInStack > 0 || src.fIsNested; |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 | 139 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 } | 253 } |
| 254 | 254 |
| 255 SkAutoTUnref<GrAccelData> data(SkNEW_ARGS(GrAccelData, (key))); | 255 SkAutoTUnref<GrAccelData> data(SkNEW_ARGS(GrAccelData, (key))); |
| 256 | 256 |
| 257 pict->EXPERIMENTAL_addAccelData(data); | 257 pict->EXPERIMENTAL_addAccelData(data); |
| 258 | 258 |
| 259 CollectLayers collector(pict, data); | 259 CollectLayers collector(pict, data); |
| 260 | 260 |
| 261 return data; | 261 return data; |
| 262 } | 262 } |
| OLD | NEW |