Index: src/gpu/GrDistanceFieldTextContext.h |
diff --git a/src/gpu/GrDistanceFieldTextContext.h b/src/gpu/GrDistanceFieldTextContext.h |
index d628e3e3bdd81673556457a32ef63dac2d67f495..6fa2d6f173855b0debde9650bcc6259dea9fac5b 100644 |
--- a/src/gpu/GrDistanceFieldTextContext.h |
+++ b/src/gpu/GrDistanceFieldTextContext.h |
@@ -18,17 +18,9 @@ class GrTextStrike; |
*/ |
class GrDistanceFieldTextContext : public GrTextContext { |
public: |
- GrDistanceFieldTextContext(GrContext*, const SkDeviceProperties&, bool enable); |
- virtual ~GrDistanceFieldTextContext(); |
+ static GrDistanceFieldTextContext* Create(GrContext*, const SkDeviceProperties&, bool enable); |
- 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&, |
- const char text[], size_t byteLength, |
- const SkScalar pos[], int scalarsPerPosition, |
- const SkPoint& offset) SK_OVERRIDE; |
+ virtual ~GrDistanceFieldTextContext(); |
private: |
enum { |
@@ -54,6 +46,17 @@ private: |
int fCurrVertex; |
SkRect fVertexBounds; |
+ GrDistanceFieldTextContext(GrContext*, const SkDeviceProperties&, bool enable); |
+ |
+ virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE; |
+ |
+ virtual void onDrawText(const GrPaint&, const SkPaint&, const char text[], size_t byteLength, |
+ SkScalar x, SkScalar y) SK_OVERRIDE; |
+ virtual void onDrawPosText(const GrPaint&, const SkPaint&, |
+ const char text[], size_t byteLength, |
+ const SkScalar pos[], int scalarsPerPosition, |
+ const SkPoint& offset) SK_OVERRIDE; |
+ |
void init(const GrPaint&, const SkPaint&); |
void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*); |
void setupCoverageEffect(const SkColor& filteredColor); |