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 "GrStencilAndCoverTextContext.h" | 8 #include "GrStencilAndCoverTextContext.h" |
9 #include "GrAtlasTextContext.h" | 9 #include "GrAtlasTextContext.h" |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 // hurt batching. | 640 // hurt batching. |
641 SkRect bounds = SkRect::MakeIWH(pipelineBuilder->getRenderTarget()->widt
h(), | 641 SkRect bounds = SkRect::MakeIWH(pipelineBuilder->getRenderTarget()->widt
h(), |
642 pipelineBuilder->getRenderTarget()->heig
ht()); | 642 pipelineBuilder->getRenderTarget()->heig
ht()); |
643 | 643 |
644 SkAutoTUnref<GrDrawBatch> batch( | 644 SkAutoTUnref<GrDrawBatch> batch( |
645 GrDrawPathRangeBatch::Create(viewMatrix, fTextRatio, fTextInverseRat
io * x, | 645 GrDrawPathRangeBatch::Create(viewMatrix, fTextRatio, fTextInverseRat
io * x, |
646 fTextInverseRatio * y, color, | 646 fTextInverseRatio * y, color, |
647 GrPathRendering::kWinding_FillType, gly
phs, fInstanceData, | 647 GrPathRendering::kWinding_FillType, gly
phs, fInstanceData, |
648 bounds)); | 648 bounds)); |
649 | 649 |
650 dc->drawBatch(pipelineBuilder, clip, batch); | 650 dc->drawBatch(*pipelineBuilder, clip, batch); |
651 } | 651 } |
652 | 652 |
653 if (fFallbackTextBlob) { | 653 if (fFallbackTextBlob) { |
654 SkPaint fallbackSkPaint(originalSkPaint); | 654 SkPaint fallbackSkPaint(originalSkPaint); |
655 fStyle.strokeRec().applyToPaint(&fallbackSkPaint); | 655 fStyle.strokeRec().applyToPaint(&fallbackSkPaint); |
656 if (!fStyle.isSimpleFill()) { | 656 if (!fStyle.isSimpleFill()) { |
657 fallbackSkPaint.setStrokeWidth(fStyle.strokeRec().getWidth() * fText
Ratio); | 657 fallbackSkPaint.setStrokeWidth(fStyle.strokeRec().getWidth() * fText
Ratio); |
658 } | 658 } |
659 | 659 |
660 fallbackTextContext->drawTextBlob(ctx, dc, clip, fallbackSkPaint, viewMa
trix, props, | 660 fallbackTextContext->drawTextBlob(ctx, dc, clip, fallbackSkPaint, viewMa
trix, props, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 } | 733 } |
734 | 734 |
735 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfNeed
ed(int *count) { | 735 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfNeed
ed(int *count) { |
736 *count = fCount; | 736 *count = fCount; |
737 if (fCount) { | 737 if (fCount) { |
738 this->flush(); | 738 this->flush(); |
739 return fBuilder->build(); | 739 return fBuilder->build(); |
740 } | 740 } |
741 return nullptr; | 741 return nullptr; |
742 } | 742 } |
OLD | NEW |