| Index: src/gpu/GrPathRendering.cpp
|
| diff --git a/src/gpu/GrPathRendering.cpp b/src/gpu/GrPathRendering.cpp
|
| index fba55d5e1e4403bb511bf4f242b11a7f353d7d9d..e97d754a46bedd6a6120bf79ca534faa0d92559b 100644
|
| --- a/src/gpu/GrPathRendering.cpp
|
| +++ b/src/gpu/GrPathRendering.cpp
|
| @@ -15,13 +15,18 @@
|
| class GlyphGenerator : public GrPathRange::PathGenerator {
|
| public:
|
| GlyphGenerator(const SkTypeface& typeface, const SkDescriptor& desc)
|
| - : fDesc(desc.copy()),
|
| - fScalerContext(typeface.createScalerContext(fDesc)) {
|
| + : fScalerContext(typeface.createScalerContext(&desc))
|
| +#ifdef SK_DEBUG
|
| + , fDesc(desc.copy())
|
| +#endif
|
| + {
|
| fFlipMatrix.setScale(1, -1);
|
| }
|
|
|
| virtual ~GlyphGenerator() {
|
| +#ifdef SK_DEBUG
|
| SkDescriptor::Free(fDesc);
|
| +#endif
|
| }
|
|
|
| int getNumPaths() override {
|
| @@ -36,20 +41,22 @@ public:
|
| fScalerContext->getPath(skGlyph, out);
|
| out->transform(fFlipMatrix); // Load glyphs with the inverted y-direction.
|
| }
|
| -
|
| +#ifdef SK_DEBUG
|
| bool isEqualTo(const SkDescriptor& desc) const override {
|
| return fDesc->equals(desc);
|
| }
|
| -
|
| +#endif
|
| private:
|
| - SkDescriptor* const fDesc;
|
| const SkAutoTDelete<SkScalerContext> fScalerContext;
|
| SkMatrix fFlipMatrix;
|
| +#ifdef SK_DEBUG
|
| + SkDescriptor* const fDesc;
|
| +#endif
|
| };
|
|
|
| GrPathRange* GrPathRendering::createGlyphs(const SkTypeface* typeface,
|
| const SkDescriptor* desc,
|
| - const SkStrokeRec& stroke) {
|
| + const GrStrokeInfo& stroke) {
|
| if (NULL == typeface) {
|
| typeface = SkTypeface::GetDefaultTypeface();
|
| SkASSERT(NULL != typeface);
|
|
|