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