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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 BatchTracker fBatch; | 531 BatchTracker fBatch; |
532 SkSTArray<1, Geometry, true> fGeoData; | 532 SkSTArray<1, Geometry, true> fGeoData; |
533 GrBatchAtlas* fAtlas; | 533 GrBatchAtlas* fAtlas; |
534 PathCache* fPathCache; | 534 PathCache* fPathCache; |
535 PathDataList* fPathList; | 535 PathDataList* fPathList; |
536 | 536 |
537 typedef GrVertexBatch INHERITED; | 537 typedef GrVertexBatch INHERITED; |
538 }; | 538 }; |
539 | 539 |
540 bool GrAADistanceFieldPathRenderer::onDrawPath(const DrawPathArgs& args) { | 540 bool GrAADistanceFieldPathRenderer::onDrawPath(const DrawPathArgs& args) { |
| 541 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(), |
| 542 "GrAADistanceFieldPathRenderer::onDrawPath"); |
541 // we've already bailed on inverse filled paths, so this is safe | 543 // we've already bailed on inverse filled paths, so this is safe |
542 if (args.fPath->isEmpty()) { | 544 if (args.fPath->isEmpty()) { |
543 return true; | 545 return true; |
544 } | 546 } |
545 | 547 |
546 if (!fAtlas) { | 548 if (!fAtlas) { |
547 fAtlas = args.fResourceProvider->createAtlas(kAlpha_8_GrPixelConfig, | 549 fAtlas = args.fResourceProvider->createAtlas(kAlpha_8_GrPixelConfig, |
548 ATLAS_TEXTURE_WIDTH, ATLAS_
TEXTURE_HEIGHT, | 550 ATLAS_TEXTURE_WIDTH, ATLAS_
TEXTURE_HEIGHT, |
549 NUM_PLOTS_X, NUM_PLOTS_Y, | 551 NUM_PLOTS_X, NUM_PLOTS_Y, |
550 &GrAADistanceFieldPathRende
rer::HandleEviction, | 552 &GrAADistanceFieldPathRende
rer::HandleEviction, |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 geometry.fAntiAlias = random->nextBool(); | 646 geometry.fAntiAlias = random->nextBool(); |
645 geometry.fGenID = random->nextU(); | 647 geometry.fGenID = random->nextU(); |
646 | 648 |
647 return AADistanceFieldPathBatch::Create(geometry, viewMatrix, | 649 return AADistanceFieldPathBatch::Create(geometry, viewMatrix, |
648 gTestStruct.fAtlas, | 650 gTestStruct.fAtlas, |
649 &gTestStruct.fPathCache, | 651 &gTestStruct.fPathCache, |
650 &gTestStruct.fPathList); | 652 &gTestStruct.fPathList); |
651 } | 653 } |
652 | 654 |
653 #endif | 655 #endif |
OLD | NEW |