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

Side by Side Diff: src/gpu/batches/GrAADistanceFieldPathRenderer.cpp

Issue 2144283002: Fix leak when DFPR fails to draw path (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months 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 | « no previous file | no next file » | 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 "GrAADistanceFieldPathRenderer.h" 8 #include "GrAADistanceFieldPathRenderer.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 SkScalar scale = desiredDimension/maxDim; 257 SkScalar scale = desiredDimension/maxDim;
258 shapeData = new ShapeData; 258 shapeData = new ShapeData;
259 if (!this->addPathToAtlas(target, 259 if (!this->addPathToAtlas(target,
260 &flushInfo, 260 &flushInfo,
261 atlas, 261 atlas,
262 shapeData, 262 shapeData,
263 args.fShape, 263 args.fShape,
264 args.fAntiAlias, 264 args.fAntiAlias,
265 desiredDimension, 265 desiredDimension,
266 scale)) { 266 scale)) {
267 delete shapeData;
267 SkDebugf("Can't rasterize path\n"); 268 SkDebugf("Can't rasterize path\n");
268 continue; 269 continue;
269 } 270 }
270 } 271 }
271 272
272 atlas->setLastUseToken(shapeData->fID, target->nextDrawToken()); 273 atlas->setLastUseToken(shapeData->fID, target->nextDrawToken());
273 274
274 this->writePathVertices(target, 275 this->writePathVertices(target,
275 atlas, 276 atlas,
276 offset, 277 offset,
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 shape, 613 shape,
613 antiAlias, 614 antiAlias,
614 viewMatrix, 615 viewMatrix,
615 gTestStruct.fAtlas, 616 gTestStruct.fAtlas,
616 &gTestStruct.fShapeCache, 617 &gTestStruct.fShapeCache,
617 &gTestStruct.fShapeList, 618 &gTestStruct.fShapeList,
618 gammaCorrect); 619 gammaCorrect);
619 } 620 }
620 621
621 #endif 622 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698