Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/gpu/GrPictureUtils.cpp

Issue 657383004: Alter layer hoisting to only hoist layers for one canvas at a time (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix noGPU build Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698