| 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 "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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |