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

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

Issue 940463006: Rename GrContentKey to GrUniqueKey (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 5 years, 10 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/GrStencilAndCoverPathRenderer.cpp ('k') | src/gpu/SkGr.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 "GrBitmapTextContext.h" 9 #include "GrBitmapTextContext.h"
10 #include "GrDrawTarget.h" 10 #include "GrDrawTarget.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 pos += scalarsPerPosition; 200 pos += scalarsPerPosition;
201 } 201 }
202 202
203 this->finish(); 203 this->finish();
204 } 204 }
205 205
206 static GrPathRange* get_gr_glyphs(GrContext* ctx, 206 static GrPathRange* get_gr_glyphs(GrContext* ctx,
207 const SkTypeface* typeface, 207 const SkTypeface* typeface,
208 const SkDescriptor* desc, 208 const SkDescriptor* desc,
209 const SkStrokeRec& stroke) { 209 const SkStrokeRec& stroke) {
210 static const GrContentKey::Domain kDomain = GrContentKey::GenerateDomain(); 210 static const GrUniqueKey::Domain kDomain = GrUniqueKey::GenerateDomain();
211 GrContentKey key; 211 GrUniqueKey key;
212 GrContentKey::Builder builder(&key, kDomain, 4); 212 GrUniqueKey::Builder builder(&key, kDomain, 4);
213 struct GlyphKey { 213 struct GlyphKey {
214 uint32_t fChecksum; 214 uint32_t fChecksum;
215 uint32_t fTypeface; 215 uint32_t fTypeface;
216 uint64_t fStroke; 216 uint64_t fStroke;
217 }; 217 };
218 GlyphKey* glyphKey = reinterpret_cast<GlyphKey*>(&builder[0]); 218 GlyphKey* glyphKey = reinterpret_cast<GlyphKey*>(&builder[0]);
219 glyphKey->fChecksum = desc ? desc->getChecksum() : 0; 219 glyphKey->fChecksum = desc ? desc->getChecksum() : 0;
220 glyphKey->fTypeface = typeface ? typeface->uniqueID() : 0; 220 glyphKey->fTypeface = typeface ? typeface->uniqueID() : 0;
221 glyphKey->fStroke = GrPath::ComputeStrokeKey(stroke); 221 glyphKey->fStroke = GrPath::ComputeStrokeKey(stroke);
222 builder.finish(); 222 builder.finish();
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 460
461 SkGlyphCache::AttachCache(fGlyphCache); 461 SkGlyphCache::AttachCache(fGlyphCache);
462 fGlyphCache = NULL; 462 fGlyphCache = NULL;
463 463
464 fPipelineBuilder.stencil()->setDisabled(); 464 fPipelineBuilder.stencil()->setDisabled();
465 fStateRestore.set(NULL); 465 fStateRestore.set(NULL);
466 fViewMatrix = fContextInitialMatrix; 466 fViewMatrix = fContextInitialMatrix;
467 GrTextContext::finish(); 467 GrTextContext::finish();
468 } 468 }
469 469
OLDNEW
« no previous file with comments | « src/gpu/GrStencilAndCoverPathRenderer.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698