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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 SkASSERT(fContext); | 590 SkASSERT(fContext); |
591 | 591 |
592 if (!fAtlas) { | 592 if (!fAtlas) { |
593 fAtlas = create_atlas(fContext, &GrAADistanceFieldPathRenderer::HandleEv
iction, | 593 fAtlas = create_atlas(fContext, &GrAADistanceFieldPathRenderer::HandleEv
iction, |
594 (void*)this); | 594 (void*)this); |
595 if (!fAtlas) { | 595 if (!fAtlas) { |
596 return false; | 596 return false; |
597 } | 597 } |
598 } | 598 } |
599 | 599 |
600 AADistanceFieldPathBatch::Geometry geometry(stroke.getStrokeRec()); | 600 AADistanceFieldPathBatch::Geometry geometry(stroke); |
601 geometry.fPath = path; | 601 geometry.fPath = path; |
602 geometry.fAntiAlias = antiAlias; | 602 geometry.fAntiAlias = antiAlias; |
603 | 603 |
604 SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color
, viewMatrix, | 604 SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color
, viewMatrix, |
605 fAtlas, &fPathC
ache, &fPathList)); | 605 fAtlas, &fPathC
ache, &fPathList)); |
606 target->drawBatch(pipelineBuilder, batch); | 606 target->drawBatch(pipelineBuilder, batch); |
607 | 607 |
608 return true; | 608 return true; |
609 } | 609 } |
610 | 610 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 geometry.fPath = GrTest::TestPath(random); | 671 geometry.fPath = GrTest::TestPath(random); |
672 geometry.fAntiAlias = random->nextBool(); | 672 geometry.fAntiAlias = random->nextBool(); |
673 | 673 |
674 return AADistanceFieldPathBatch::Create(geometry, color, viewMatrix, | 674 return AADistanceFieldPathBatch::Create(geometry, color, viewMatrix, |
675 gTestStruct.fAtlas, | 675 gTestStruct.fAtlas, |
676 &gTestStruct.fPathCache, | 676 &gTestStruct.fPathCache, |
677 &gTestStruct.fPathList); | 677 &gTestStruct.fPathList); |
678 } | 678 } |
679 | 679 |
680 #endif | 680 #endif |
OLD | NEW |