Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: src/gpu/text/GrStencilAndCoverTextContext.cpp

Issue 1863013003: Pass effects directly to fontcache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: removed DUMMY effects Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp ('k') | src/gpu/text/GrTextUtils.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 glyphs = ctx->resourceProvider()->createGlyphs(fFont.getTypeface(),{ },nullptr, fStroke);
bungeman-skia 2016/04/08 14:42:06 This is kind of like passing 'false', at the call
reed1 2016/04/08 19:37:20 Done.
543 } else { 543 } else {
544 SkGlyphCache* cache = this->getGlyphCache(); 544 SkGlyphCache* cache = this->getGlyphCache();
545 glyphs = ctx->resourceProvider()->createGlyphs(cache->getScalerConte xt()->getTypeface(), 545 glyphs = ctx->resourceProvider()->createGlyphs(cache->getScalerConte xt()->getTypeface(),
546 cache->getScalerConte xt()->getEffects(),
546 &cache->getDescriptor (), 547 &cache->getDescriptor (),
547 fStroke); 548 fStroke);
548 } 549 }
549 ctx->resourceProvider()->assignUniqueKeyToResource(fGlyphPathsKey, glyph s); 550 ctx->resourceProvider()->assignUniqueKeyToResource(fGlyphPathsKey, glyph s);
550 } 551 }
551 return glyphs; 552 return glyphs;
552 } 553 }
553 554
554 inline void GrStencilAndCoverTextContext::TextRun::appendGlyph(const SkGlyph& gl yph, 555 inline void GrStencilAndCoverTextContext::TextRun::appendGlyph(const SkGlyph& gl yph,
555 const SkPoint& po s, 556 const SkPoint& po s,
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp ('k') | src/gpu/text/GrTextUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698