| Index: src/gpu/GrDistanceFieldTextContext.h
|
| diff --git a/src/gpu/GrDistanceFieldTextContext.h b/src/gpu/GrDistanceFieldTextContext.h
|
| index 0b08b5986c154d5a776530ee8d02b115cd1074c6..d628e3e3bdd81673556457a32ef63dac2d67f495 100644
|
| --- a/src/gpu/GrDistanceFieldTextContext.h
|
| +++ b/src/gpu/GrDistanceFieldTextContext.h
|
| @@ -21,6 +21,8 @@ public:
|
| GrDistanceFieldTextContext(GrContext*, const SkDeviceProperties&, bool enable);
|
| virtual ~GrDistanceFieldTextContext();
|
|
|
| + virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE;
|
| +
|
| virtual void drawText(const GrPaint&, const SkPaint&, const char text[], size_t byteLength,
|
| SkScalar x, SkScalar y) SK_OVERRIDE;
|
| virtual void drawPosText(const GrPaint&, const SkPaint&,
|
| @@ -28,38 +30,35 @@ public:
|
| const SkScalar pos[], int scalarsPerPosition,
|
| const SkPoint& offset) SK_OVERRIDE;
|
|
|
| - virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE;
|
| -
|
| private:
|
| + enum {
|
| + kMinRequestedGlyphs = 1,
|
| + kDefaultRequestedGlyphs = 64,
|
| + kMinRequestedVerts = kMinRequestedGlyphs * 4,
|
| + kDefaultRequestedVerts = kDefaultRequestedGlyphs * 4,
|
| + };
|
| +
|
| GrTextStrike* fStrike;
|
| SkScalar fTextRatio;
|
| bool fUseLCDText;
|
| bool fEnableDFRendering;
|
| SkAutoTUnref<GrGeometryProcessor> fCachedGeometryProcessor;
|
| // Used to check whether fCachedEffect is still valid.
|
| - uint32_t fEffectTextureUniqueID;
|
| - SkColor fEffectColor;
|
| - uint32_t fEffectFlags;
|
| - GrTexture* fGammaTexture;
|
| + uint32_t fEffectTextureUniqueID;
|
| + SkColor fEffectColor;
|
| + uint32_t fEffectFlags;
|
| + GrTexture* fGammaTexture;
|
| + void* fVertices;
|
| + int32_t fMaxVertices;
|
| + GrTexture* fCurrTexture;
|
| + int fCurrVertex;
|
| + SkRect fVertexBounds;
|
|
|
| void init(const GrPaint&, const SkPaint&);
|
| - void drawPackedGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*);
|
| - void flushGlyphs(); // automatically called by destructor
|
| + void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*);
|
| void setupCoverageEffect(const SkColor& filteredColor);
|
| + void flush(); // automatically called by destructor
|
| void finish();
|
| -
|
| - enum {
|
| - kMinRequestedGlyphs = 1,
|
| - kDefaultRequestedGlyphs = 64,
|
| - kMinRequestedVerts = kMinRequestedGlyphs * 4,
|
| - kDefaultRequestedVerts = kDefaultRequestedGlyphs * 4,
|
| - };
|
| -
|
| - void* fVertices;
|
| - int32_t fMaxVertices;
|
| - GrTexture* fCurrTexture;
|
| - int fCurrVertex;
|
| - SkRect fVertexBounds;
|
| };
|
|
|
| #endif
|
|
|