OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "GrAADistanceFieldPathRenderer.h" | 9 #include "GrAADistanceFieldPathRenderer.h" |
10 | 10 |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 args.fPath, | 268 args.fPath, |
269 args.fStroke, | 269 args.fStroke, |
270 args.fAntiAlias, | 270 args.fAntiAlias, |
271 desiredDimension, | 271 desiredDimension, |
272 scale)) { | 272 scale)) { |
273 SkDebugf("Can't rasterize path\n"); | 273 SkDebugf("Can't rasterize path\n"); |
274 return; | 274 return; |
275 } | 275 } |
276 } | 276 } |
277 | 277 |
278 atlas->setLastRefToken(args.fPathData->fID, batchTarget->currentToke
n()); | 278 atlas->setLastUseToken(args.fPathData->fID, batchTarget->currentToke
n()); |
279 | 279 |
280 // Now set vertices | 280 // Now set vertices |
281 intptr_t offset = reinterpret_cast<intptr_t>(vertices); | 281 intptr_t offset = reinterpret_cast<intptr_t>(vertices); |
282 offset += i * GrBatchTarget::kVertsPerRect * vertexStride; | 282 offset += i * GrBatchTarget::kVertsPerRect * vertexStride; |
283 SkPoint* positions = reinterpret_cast<SkPoint*>(offset); | 283 SkPoint* positions = reinterpret_cast<SkPoint*>(offset); |
284 this->drawPath(batchTarget, | 284 this->drawPath(batchTarget, |
285 atlas, | 285 atlas, |
286 pipeline, | 286 pipeline, |
287 dfProcessor, | 287 dfProcessor, |
288 positions, | 288 positions, |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color
, viewMatrix, | 607 SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color
, viewMatrix, |
608 fAtlas, &fPathC
ache, &fPathList)); | 608 fAtlas, &fPathC
ache, &fPathList)); |
609 | 609 |
610 SkRect bounds = path.getBounds(); | 610 SkRect bounds = path.getBounds(); |
611 viewMatrix.mapRect(&bounds); | 611 viewMatrix.mapRect(&bounds); |
612 target->drawBatch(pipelineBuilder, batch, &bounds); | 612 target->drawBatch(pipelineBuilder, batch, &bounds); |
613 | 613 |
614 return true; | 614 return true; |
615 } | 615 } |
616 | 616 |
OLD | NEW |