| 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 532     } | 532     } | 
| 533 | 533 | 
| 534     fFallbackTextBlob.reset(fallback.buildIfNeeded(&fFallbackGlyphCount)); | 534     fFallbackTextBlob.reset(fallback.buildIfNeeded(&fFallbackGlyphCount)); | 
| 535 } | 535 } | 
| 536 | 536 | 
| 537 GrPathRange* GrStencilAndCoverTextContext::TextRun::createGlyphs(GrContext* ctx)
      const { | 537 GrPathRange* GrStencilAndCoverTextContext::TextRun::createGlyphs(GrContext* ctx)
      const { | 
| 538     GrPathRange* glyphs = static_cast<GrPathRange*>( | 538     GrPathRange* glyphs = static_cast<GrPathRange*>( | 
| 539             ctx->resourceProvider()->findAndRefResourceByUniqueKey(fGlyphPathsKe
     y)); | 539             ctx->resourceProvider()->findAndRefResourceByUniqueKey(fGlyphPathsKe
     y)); | 
| 540     if (nullptr == glyphs) { | 540     if (nullptr == glyphs) { | 
| 541         if (fUsingRawGlyphPaths) { | 541         if (fUsingRawGlyphPaths) { | 
| 542             glyphs = ctx->resourceProvider()->createGlyphs(fFont.getTypeface(), 
     nullptr, fStroke); | 542             SkScalerContextEffects noeffects; | 
|  | 543             glyphs = ctx->resourceProvider()->createGlyphs(fFont.getTypeface(), 
     noeffects, | 
|  | 544                                                            nullptr, fStroke); | 
| 543         } else { | 545         } else { | 
| 544             SkGlyphCache* cache = this->getGlyphCache(); | 546             SkGlyphCache* cache = this->getGlyphCache(); | 
| 545             glyphs = ctx->resourceProvider()->createGlyphs(cache->getScalerConte
     xt()->getTypeface(), | 547             glyphs = ctx->resourceProvider()->createGlyphs(cache->getScalerConte
     xt()->getTypeface(), | 
|  | 548                                                            cache->getScalerConte
     xt()->getEffects(), | 
| 546                                                            &cache->getDescriptor
     (), | 549                                                            &cache->getDescriptor
     (), | 
| 547                                                            fStroke); | 550                                                            fStroke); | 
| 548         } | 551         } | 
| 549         ctx->resourceProvider()->assignUniqueKeyToResource(fGlyphPathsKey, glyph
     s); | 552         ctx->resourceProvider()->assignUniqueKeyToResource(fGlyphPathsKey, glyph
     s); | 
| 550     } | 553     } | 
| 551     return glyphs; | 554     return glyphs; | 
| 552 } | 555 } | 
| 553 | 556 | 
| 554 inline void GrStencilAndCoverTextContext::TextRun::appendGlyph(const SkGlyph& gl
     yph, | 557 inline void GrStencilAndCoverTextContext::TextRun::appendGlyph(const SkGlyph& gl
     yph, | 
| 555                                                                const SkPoint& po
     s, | 558                                                                const SkPoint& po
     s, | 
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 700 } | 703 } | 
| 701 | 704 | 
| 702 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfNeed
     ed(int *count) { | 705 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfNeed
     ed(int *count) { | 
| 703     *count = fCount; | 706     *count = fCount; | 
| 704     if (fCount) { | 707     if (fCount) { | 
| 705         this->flush(); | 708         this->flush(); | 
| 706         return fBuilder->build(); | 709         return fBuilder->build(); | 
| 707     } | 710     } | 
| 708     return nullptr; | 711     return nullptr; | 
| 709 } | 712 } | 
| OLD | NEW | 
|---|