Index: src/gpu/GrTextContext.h |
diff --git a/src/gpu/GrTextContext.h b/src/gpu/GrTextContext.h |
index b82a64840b1f95d28a96bd20bfc0b0f4fbf6139a..95344dd39fbea0ee3e7c4095c828ae0c88bc1f63 100644 |
--- a/src/gpu/GrTextContext.h |
+++ b/src/gpu/GrTextContext.h |
@@ -23,18 +23,17 @@ class GrFontScaler; |
*/ |
class GrTextContext { |
public: |
- virtual ~GrTextContext() {} |
+ virtual ~GrTextContext(); |
- virtual bool canDraw(const SkPaint& paint) = 0; |
- |
- virtual void drawText(const GrPaint&, const SkPaint&, const char text[], size_t byteLength, |
- SkScalar x, SkScalar y) = 0; |
- virtual void drawPosText(const GrPaint&, const SkPaint&, |
- const char text[], size_t byteLength, |
- const SkScalar pos[], int scalarsPerPosition, |
- const SkPoint& offset) = 0; |
+ bool drawText(const GrPaint&, const SkPaint&, const char text[], size_t byteLength, |
+ SkScalar x, SkScalar y); |
+ bool drawPosText(const GrPaint&, const SkPaint&, |
+ const char text[], size_t byteLength, |
+ const SkScalar pos[], int scalarsPerPosition, |
+ const SkPoint& offset); |
protected: |
+ GrTextContext* fFallbackTextContext; |
GrContext* fContext; |
SkDeviceProperties fDeviceProperties; |
@@ -45,6 +44,15 @@ protected: |
GrTextContext(GrContext*, const SkDeviceProperties&); |
+ virtual bool canDraw(const SkPaint& paint) = 0; |
+ |
+ virtual void onDrawText(const GrPaint&, const SkPaint&, const char text[], size_t byteLength, |
+ SkScalar x, SkScalar y) = 0; |
+ virtual void onDrawPosText(const GrPaint&, const SkPaint&, |
+ const char text[], size_t byteLength, |
+ const SkScalar pos[], int scalarsPerPosition, |
+ const SkPoint& offset) = 0; |
+ |
void init(const GrPaint&, const SkPaint&); |
void finish() { fDrawTarget = NULL; } |