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 newClip.intersect(this->adjustAndMap(srcRect, dp.paint)); | 119 newClip.intersect(this->adjustAndMap(srcRect, dp.paint)); |
120 | 120 |
121 GrAccelData::SaveLayerInfo& dst = fAccelData->addSaveLayerInfo(); | 121 GrAccelData::SaveLayerInfo& dst = fAccelData->addSaveLayerInfo(); |
122 | 122 |
123 dst.fValid = true; | 123 dst.fValid = true; |
124 // If src.fPicture is NULL the layer is in dp.picture; otherwise | 124 // If src.fPicture is NULL the layer is in dp.picture; otherwise |
125 // it belongs to a sub-picture. | 125 // it belongs to a sub-picture. |
126 dst.fPicture = src.fPicture ? src.fPicture : static_cast<const SkPic ture*>(dp.picture); | 126 dst.fPicture = src.fPicture ? src.fPicture : static_cast<const SkPic ture*>(dp.picture); |
127 dst.fPicture->ref(); | 127 dst.fPicture->ref(); |
128 dst.fSize = SkISize::Make(newClip.width(), newClip.height()); | 128 dst.fSize = SkISize::Make(newClip.width(), newClip.height()); |
129 dst.fOffset = SkIPoint::Make(newClip.fLeft, newClip.fTop); | 129 dst.fOffset = SkIPoint::Make(newClip.fLeft, newClip.fTop); |
robertphillips
2014/09/30 17:44:40
This is just a minor bug fix. I got the order wron
| |
130 dst.fOriginXform = *fCTM; | 130 dst.fOriginXform = src.fOriginXform; |
131 dst.fOriginXform.postConcat(src.fOriginXform); | 131 dst.fOriginXform.postConcat(*fCTM); |
132 if (src.fPaint) { | 132 if (src.fPaint) { |
133 dst.fPaint = SkNEW_ARGS(SkPaint, (*src.fPaint)); | 133 dst.fPaint = SkNEW_ARGS(SkPaint, (*src.fPaint)); |
134 } | 134 } |
135 dst.fSaveLayerOpID = src.fSaveLayerOpID; | 135 dst.fSaveLayerOpID = src.fSaveLayerOpID; |
136 dst.fRestoreOpID = src.fRestoreOpID; | 136 dst.fRestoreOpID = src.fRestoreOpID; |
137 dst.fHasNestedLayers = src.fHasNestedLayers; | 137 dst.fHasNestedLayers = src.fHasNestedLayers; |
138 dst.fIsNested = fSaveLayersInStack > 0 || src.fIsNested; | 138 dst.fIsNested = fSaveLayersInStack > 0 || src.fIsNested; |
139 } | 139 } |
140 } | 140 } |
141 | 141 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 } | 256 } |
257 | 257 |
258 SkAutoTUnref<GrAccelData> data(SkNEW_ARGS(GrAccelData, (key))); | 258 SkAutoTUnref<GrAccelData> data(SkNEW_ARGS(GrAccelData, (key))); |
259 | 259 |
260 pict->EXPERIMENTAL_addAccelData(data); | 260 pict->EXPERIMENTAL_addAccelData(data); |
261 | 261 |
262 CollectLayers collector(pict, data); | 262 CollectLayers collector(pict, data); |
263 | 263 |
264 return data; | 264 return data; |
265 } | 265 } |
OLD | NEW |