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 "GrDrawContext.h" | 10 #include "GrDrawContext.h" |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 } | 624 } |
625 | 625 |
626 fallbackTextContext->drawTextBlob(ctx, dc, pipelineBuilder->clip(), fall
backSkPaint, | 626 fallbackTextContext->drawTextBlob(ctx, dc, pipelineBuilder->clip(), fall
backSkPaint, |
627 viewMatrix, props, fFallbackTextBlob,
x, y, nullptr, | 627 viewMatrix, props, fFallbackTextBlob,
x, y, nullptr, |
628 clipBounds); | 628 clipBounds); |
629 } | 629 } |
630 } | 630 } |
631 | 631 |
632 SkGlyphCache* GrStencilAndCoverTextContext::TextRun::getGlyphCache() const { | 632 SkGlyphCache* GrStencilAndCoverTextContext::TextRun::getGlyphCache() const { |
633 if (!fDetachedGlyphCache) { | 633 if (!fDetachedGlyphCache) { |
634 fDetachedGlyphCache = fFont.detachCache(nullptr, SkPaint::FakeGamma::Off
, nullptr); | 634 fDetachedGlyphCache = fFont.detachCache(nullptr, SkPaint::kNone_ScalerCo
ntextFlags, |
| 635 nullptr); |
635 } | 636 } |
636 return fDetachedGlyphCache; | 637 return fDetachedGlyphCache; |
637 } | 638 } |
638 | 639 |
639 | 640 |
640 void GrStencilAndCoverTextContext::TextRun::releaseGlyphCache() const { | 641 void GrStencilAndCoverTextContext::TextRun::releaseGlyphCache() const { |
641 if (fDetachedGlyphCache) { | 642 if (fDetachedGlyphCache) { |
642 SkGlyphCache::AttachCache(fDetachedGlyphCache); | 643 SkGlyphCache::AttachCache(fDetachedGlyphCache); |
643 fDetachedGlyphCache = nullptr; | 644 fDetachedGlyphCache = nullptr; |
644 } | 645 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 } | 700 } |
700 | 701 |
701 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfNeed
ed(int *count) { | 702 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfNeed
ed(int *count) { |
702 *count = fCount; | 703 *count = fCount; |
703 if (fCount) { | 704 if (fCount) { |
704 this->flush(); | 705 this->flush(); |
705 return fBuilder->build(); | 706 return fBuilder->build(); |
706 } | 707 } |
707 return nullptr; | 708 return nullptr; |
708 } | 709 } |
OLD | NEW |