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