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

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

Issue 1986253002: Rename SkDescriptor::equals to SkDescriptor::operator== (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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/GrFontScaler.h » ('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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 if (regenTexCoords) { 153 if (regenTexCoords) {
154 info->resetBulkUseToken(); 154 info->resetBulkUseToken();
155 155
156 // We can reuse if we have a valid strike and our descriptors / typeface are the 156 // We can reuse if we have a valid strike and our descriptors / typeface are the
157 // same. The override descriptor is only for the non distance field tex t within 157 // same. The override descriptor is only for the non distance field tex t within
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 == *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, run->fEffects, *d esc);
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) {
(...skipping 138 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/GrFontScaler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698