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

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

Issue 1872253004: Revert of Pass effects directly to fontcache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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.cpp ('k') | src/gpu/text/GrStencilAndCoverTextContext.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 2016 Google Inc. 2 * Copyright 2016 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 "GrAtlasTextBlob.h" 8 #include "GrAtlasTextBlob.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // a run 158 // a run
159 const SkDescriptor* newDesc = (run->fOverrideDescriptor && !info->drawAs DistanceFields()) ? 159 const SkDescriptor* newDesc = (run->fOverrideDescriptor && !info->drawAs DistanceFields()) ?
160 run->fOverrideDescriptor->getDesc() : 160 run->fOverrideDescriptor->getDesc() :
161 run->fDescriptor.getDesc(); 161 run->fDescriptor.getDesc();
162 if (!*cache || !SkTypeface::Equal(*typeface, run->fTypeface) || 162 if (!*cache || !SkTypeface::Equal(*typeface, run->fTypeface) ||
163 !((*desc)->equals(*newDesc))) { 163 !((*desc)->equals(*newDesc))) {
164 if (*cache) { 164 if (*cache) {
165 SkGlyphCache::AttachCache(*cache); 165 SkGlyphCache::AttachCache(*cache);
166 } 166 }
167 *desc = newDesc; 167 *desc = newDesc;
168 *cache = SkGlyphCache::DetachCache(run->fTypeface, run->fEffects, *d esc); 168 *cache = SkGlyphCache::DetachCache(run->fTypeface, *desc);
169 *scaler = GrTextUtils::GetGrFontScaler(*cache); 169 *scaler = GrTextUtils::GetGrFontScaler(*cache);
170 *typeface = run->fTypeface; 170 *typeface = run->fTypeface;
171 } 171 }
172 172
173 if (regenGlyphs) { 173 if (regenGlyphs) {
174 strike = fontCache->getStrike(*scaler); 174 strike = fontCache->getStrike(*scaler);
175 } else { 175 } else {
176 strike = info->strike(); 176 strike = info->strike();
177 } 177 }
178 } 178 }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // set use tokens for all of the glyphs in our subrun. This is only valid if we 312 // set use tokens for all of the glyphs in our subrun. This is only valid if we
313 // have a valid atlas generation 313 // have a valid atlas generation
314 fontCache->setUseTokenBulk(*info.bulkUseToken(), target->nextDrawTok en(), 314 fontCache->setUseTokenBulk(*info.bulkUseToken(), target->nextDrawTok en(),
315 info.maskFormat()); 315 info.maskFormat());
316 break; 316 break;
317 } 317 }
318 318
319 *byteCount = info.byteCount(); 319 *byteCount = info.byteCount();
320 *vertices = fVertices + info.vertexStartIndex(); 320 *vertices = fVertices + info.vertexStartIndex();
321 } 321 }
OLDNEW
« no previous file with comments | « src/gpu/text/GrAtlasTextBlob.cpp ('k') | src/gpu/text/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698