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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 geometry.fAntiAlias = args.fAntiAlias; | 557 geometry.fAntiAlias = args.fAntiAlias; |
558 // Note: this is the generation ID of the _original_ path. When a new path i
s | 558 // Note: this is the generation ID of the _original_ path. When a new path i
s |
559 // generated due to stroking it is important that the original path's id is
used | 559 // generated due to stroking it is important that the original path's id is
used |
560 // for caching. | 560 // for caching. |
561 geometry.fGenID = args.fPath->getGenerationID(); | 561 geometry.fGenID = args.fPath->getGenerationID(); |
562 | 562 |
563 SkAutoTUnref<GrDrawBatch> batch(AADistanceFieldPathBatch::Create(geometry, | 563 SkAutoTUnref<GrDrawBatch> batch(AADistanceFieldPathBatch::Create(geometry, |
564 *args.fView
Matrix, fAtlas, | 564 *args.fView
Matrix, fAtlas, |
565 &fPathCache
, &fPathList, | 565 &fPathCache
, &fPathList, |
566 args.fGamma
Correct)); | 566 args.fGamma
Correct)); |
567 args.fTarget->drawBatch(*args.fPipelineBuilder, batch); | 567 args.fTarget->drawBatch(*args.fPipelineBuilder, *args.fClip, batch); |
568 | 568 |
569 return true; | 569 return true; |
570 } | 570 } |
571 | 571 |
572 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 572 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
573 | 573 |
574 #ifdef GR_TEST_UTILS | 574 #ifdef GR_TEST_UTILS |
575 | 575 |
576 struct PathTestStruct { | 576 struct PathTestStruct { |
577 typedef GrAADistanceFieldPathRenderer::PathCache PathCache; | 577 typedef GrAADistanceFieldPathRenderer::PathCache PathCache; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 geometry.fGenID = random->nextU(); | 640 geometry.fGenID = random->nextU(); |
641 | 641 |
642 return AADistanceFieldPathBatch::Create(geometry, viewMatrix, | 642 return AADistanceFieldPathBatch::Create(geometry, viewMatrix, |
643 gTestStruct.fAtlas, | 643 gTestStruct.fAtlas, |
644 &gTestStruct.fPathCache, | 644 &gTestStruct.fPathCache, |
645 &gTestStruct.fPathList, | 645 &gTestStruct.fPathList, |
646 gammaCorrect); | 646 gammaCorrect); |
647 } | 647 } |
648 | 648 |
649 #endif | 649 #endif |
OLD | NEW |