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" |
11 #include "GrBatchTest.h" | 11 #include "GrBatchTest.h" |
12 #include "GrBuffer.h" | 12 #include "GrBuffer.h" |
13 #include "GrContext.h" | 13 #include "GrContext.h" |
| 14 #include "GrPipelineBuilder.h" |
14 #include "GrResourceProvider.h" | 15 #include "GrResourceProvider.h" |
15 #include "GrSurfacePriv.h" | 16 #include "GrSurfacePriv.h" |
16 #include "GrSWMaskHelper.h" | 17 #include "GrSWMaskHelper.h" |
17 #include "GrTexturePriv.h" | 18 #include "GrTexturePriv.h" |
18 #include "batches/GrVertexBatch.h" | 19 #include "batches/GrVertexBatch.h" |
19 #include "effects/GrDistanceFieldGeoProc.h" | 20 #include "effects/GrDistanceFieldGeoProc.h" |
20 | 21 |
21 #include "SkDistanceFieldGen.h" | 22 #include "SkDistanceFieldGen.h" |
22 #include "SkRTConf.h" | 23 #include "SkRTConf.h" |
23 | 24 |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 return false; | 526 return false; |
526 } | 527 } |
527 } | 528 } |
528 | 529 |
529 SkAutoTUnref<GrDrawBatch> batch(new AADistanceFieldPathBatch(args.fPaint->ge
tColor(), | 530 SkAutoTUnref<GrDrawBatch> batch(new AADistanceFieldPathBatch(args.fPaint->ge
tColor(), |
530 *args.fShape, | 531 *args.fShape, |
531 args.fAntiAlias
, *args.fViewMatrix, | 532 args.fAntiAlias
, *args.fViewMatrix, |
532 fAtlas, &fShape
Cache, &fShapeList, | 533 fAtlas, &fShape
Cache, &fShapeList, |
533 args.fGammaCorr
ect)); | 534 args.fGammaCorr
ect)); |
534 | 535 |
535 args.fDrawContext->drawBatch(*args.fPaint, *args.fClip, *args.fUserStencilSe
ttings, batch); | 536 GrPipelineBuilder pipelineBuilder(*args.fPaint); |
| 537 pipelineBuilder.setUserStencil(args.fUserStencilSettings); |
| 538 |
| 539 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); |
536 | 540 |
537 return true; | 541 return true; |
538 } | 542 } |
539 | 543 |
540 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 544 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
541 | 545 |
542 #ifdef GR_TEST_UTILS | 546 #ifdef GR_TEST_UTILS |
543 | 547 |
544 struct PathTestStruct { | 548 struct PathTestStruct { |
545 typedef GrAADistanceFieldPathRenderer::ShapeCache ShapeCache; | 549 typedef GrAADistanceFieldPathRenderer::ShapeCache ShapeCache; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 shape, | 613 shape, |
610 antiAlias, | 614 antiAlias, |
611 viewMatrix, | 615 viewMatrix, |
612 gTestStruct.fAtlas, | 616 gTestStruct.fAtlas, |
613 &gTestStruct.fShapeCache, | 617 &gTestStruct.fShapeCache, |
614 &gTestStruct.fShapeList, | 618 &gTestStruct.fShapeList, |
615 gammaCorrect); | 619 gammaCorrect); |
616 } | 620 } |
617 | 621 |
618 #endif | 622 #endif |
OLD | NEW |