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 "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 Loading... |
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 Loading... |
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 |
OLD | NEW |