| 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 fAtlas = args.fResourceProvider->createAtlas(kAlpha_8_GrPixelConfig, | 524 fAtlas = args.fResourceProvider->createAtlas(kAlpha_8_GrPixelConfig, |
| 525 ATLAS_TEXTURE_WIDTH, ATLAS_
TEXTURE_HEIGHT, | 525 ATLAS_TEXTURE_WIDTH, ATLAS_
TEXTURE_HEIGHT, |
| 526 NUM_PLOTS_X, NUM_PLOTS_Y, | 526 NUM_PLOTS_X, NUM_PLOTS_Y, |
| 527 &GrAADistanceFieldPathRende
rer::HandleEviction, | 527 &GrAADistanceFieldPathRende
rer::HandleEviction, |
| 528 (void*)this); | 528 (void*)this); |
| 529 if (!fAtlas) { | 529 if (!fAtlas) { |
| 530 return false; | 530 return false; |
| 531 } | 531 } |
| 532 } | 532 } |
| 533 | 533 |
| 534 SkAutoTUnref<GrDrawBatch> batch(new AADistanceFieldPathBatch(args.fColor, *a
rgs.fShape, | 534 SkAutoTUnref<GrDrawBatch> batch(new AADistanceFieldPathBatch(args.fPaint->ge
tColor(), |
| 535 *args.fShape, |
| 535 args.fAntiAlias
, *args.fViewMatrix, | 536 args.fAntiAlias
, *args.fViewMatrix, |
| 536 fAtlas, &fShape
Cache, &fShapeList, | 537 fAtlas, &fShape
Cache, &fShapeList, |
| 537 args.fGammaCorr
ect)); | 538 args.fGammaCorr
ect)); |
| 538 | 539 |
| 539 GrPipelineBuilder pipelineBuilder(*args.fPaint); | 540 GrPipelineBuilder pipelineBuilder(*args.fPaint); |
| 540 pipelineBuilder.setUserStencil(args.fUserStencilSettings); | 541 pipelineBuilder.setUserStencil(args.fUserStencilSettings); |
| 541 | 542 |
| 542 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); | 543 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); |
| 543 | 544 |
| 544 return true; | 545 return true; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 shape, | 617 shape, |
| 617 antiAlias, | 618 antiAlias, |
| 618 viewMatrix, | 619 viewMatrix, |
| 619 gTestStruct.fAtlas, | 620 gTestStruct.fAtlas, |
| 620 &gTestStruct.fShapeCache, | 621 &gTestStruct.fShapeCache, |
| 621 &gTestStruct.fShapeList, | 622 &gTestStruct.fShapeList, |
| 622 gammaCorrect); | 623 gammaCorrect); |
| 623 } | 624 } |
| 624 | 625 |
| 625 #endif | 626 #endif |
| OLD | NEW |