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

Side by Side Diff: src/gpu/GrPathRendering.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/core/SkGlyphCache.cpp ('k') | src/gpu/text/GrAtlasTextBlob.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 "GrPathRendering.h" 8 #include "GrPathRendering.h"
9 #include "SkDescriptor.h" 9 #include "SkDescriptor.h"
10 #include "SkGlyph.h" 10 #include "SkGlyph.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 void generatePath(int glyphID, SkPath* out) override { 66 void generatePath(int glyphID, SkPath* out) override {
67 SkGlyph skGlyph; 67 SkGlyph skGlyph;
68 skGlyph.initWithGlyphID(glyphID); 68 skGlyph.initWithGlyphID(glyphID);
69 fScalerContext->getMetrics(&skGlyph); 69 fScalerContext->getMetrics(&skGlyph);
70 70
71 fScalerContext->getPath(skGlyph, out); 71 fScalerContext->getPath(skGlyph, out);
72 } 72 }
73 #ifdef SK_DEBUG 73 #ifdef SK_DEBUG
74 bool isEqualTo(const SkDescriptor& desc) const override { 74 bool isEqualTo(const SkDescriptor& desc) const override { return *fDesc == d esc; }
75 return fDesc->equals(desc);
76 }
77 #endif 75 #endif
78 private: 76 private:
79 const SkAutoTDelete<SkScalerContext> fScalerContext; 77 const SkAutoTDelete<SkScalerContext> fScalerContext;
80 #ifdef SK_DEBUG 78 #ifdef SK_DEBUG
81 SkDescriptor* const fDesc; 79 SkDescriptor* const fDesc;
82 #endif 80 #endif
83 }; 81 };
84 82
85 GrPathRange* GrPathRendering::createGlyphs(const SkTypeface* typeface, 83 GrPathRange* GrPathRendering::createGlyphs(const SkTypeface* typeface,
86 const SkScalerContextEffects& effects , 84 const SkScalerContextEffects& effects ,
(...skipping 22 matching lines...) Expand all
109 genericDesc->init(); 107 genericDesc->init();
110 genericDesc->addEntry(kRec_SkDescriptorTag, sizeof(rec), &rec); 108 genericDesc->addEntry(kRec_SkDescriptorTag, sizeof(rec), &rec);
111 genericDesc->computeChecksum(); 109 genericDesc->computeChecksum();
112 110
113 // No effects, so we make a dummy struct 111 // No effects, so we make a dummy struct
114 SkScalerContextEffects noEffects; 112 SkScalerContextEffects noEffects;
115 113
116 SkAutoTUnref<GlyphGenerator> generator(new GlyphGenerator(*typeface, noEffec ts, *genericDesc)); 114 SkAutoTUnref<GlyphGenerator> generator(new GlyphGenerator(*typeface, noEffec ts, *genericDesc));
117 return this->createPathRange(generator, style); 115 return this->createPathRange(generator, style);
118 } 116 }
OLDNEW
« no previous file with comments | « src/core/SkGlyphCache.cpp ('k') | src/gpu/text/GrAtlasTextBlob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698