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

Unified Diff: src/gpu/GrPathRendering.cpp

Issue 1863013003: Pass effects directly to fontcache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: name the empty effects 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrPathRendering.h ('k') | src/gpu/GrResourceProvider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPathRendering.cpp
diff --git a/src/gpu/GrPathRendering.cpp b/src/gpu/GrPathRendering.cpp
index 0287eb08aa82c1a5db5c15fd3fcf8dd65fb2c791..a3bba4bc7f2a163743d0edfb776341883a2f71b5 100644
--- a/src/gpu/GrPathRendering.cpp
+++ b/src/gpu/GrPathRendering.cpp
@@ -14,8 +14,9 @@
class GlyphGenerator : public GrPathRange::PathGenerator {
public:
- GlyphGenerator(const SkTypeface& typeface, const SkDescriptor& desc)
- : fScalerContext(typeface.createScalerContext(&desc))
+ GlyphGenerator(const SkTypeface& typeface, const SkScalerContextEffects& effects,
+ const SkDescriptor& desc)
+ : fScalerContext(typeface.createScalerContext(effects, &desc))
#ifdef SK_DEBUG
, fDesc(desc.copy())
#endif
@@ -51,6 +52,7 @@ private:
};
GrPathRange* GrPathRendering::createGlyphs(const SkTypeface* typeface,
+ const SkScalerContextEffects& effects,
const SkDescriptor* desc,
const GrStrokeInfo& stroke) {
if (nullptr == typeface) {
@@ -59,7 +61,7 @@ GrPathRange* GrPathRendering::createGlyphs(const SkTypeface* typeface,
}
if (desc) {
- SkAutoTUnref<GlyphGenerator> generator(new GlyphGenerator(*typeface, *desc));
+ SkAutoTUnref<GlyphGenerator> generator(new GlyphGenerator(*typeface, effects, *desc));
return this->createPathRange(generator, stroke);
}
@@ -76,7 +78,10 @@ GrPathRange* GrPathRendering::createGlyphs(const SkTypeface* typeface,
genericDesc->init();
genericDesc->addEntry(kRec_SkDescriptorTag, sizeof(rec), &rec);
genericDesc->computeChecksum();
+
+ // No effects, so we make a dummy struct
+ SkScalerContextEffects noEffects;
- SkAutoTUnref<GlyphGenerator> generator(new GlyphGenerator(*typeface, *genericDesc));
+ SkAutoTUnref<GlyphGenerator> generator(new GlyphGenerator(*typeface, noEffects, *genericDesc));
return this->createPathRange(generator, stroke);
}
« no previous file with comments | « src/gpu/GrPathRendering.h ('k') | src/gpu/GrResourceProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698