Chromium Code Reviews| Index: include/gpu/GrTextContext.h |
| diff --git a/include/gpu/GrTextContext.h b/include/gpu/GrTextContext.h |
| index 5204da4b01efa4f022a9fe47403dc0a6dfc409bb..467fc3c836832e8913ae13ec413f5d3b3f232f19 100644 |
| --- a/include/gpu/GrTextContext.h |
| +++ b/include/gpu/GrTextContext.h |
| @@ -13,45 +13,29 @@ |
| #include "GrPaint.h" |
| class GrContext; |
| -class GrTextStrike; |
| -class GrFontScaler; |
| class GrDrawTarget; |
| +class GrFontScaler; |
| +/* |
| + * This class wraps the state for a single text render |
| + */ |
| class GrTextContext { |
| public: |
| GrTextContext(GrContext*, const GrPaint&); |
|
bsalomon
2013/10/14 19:32:47
private?
jvanverth1
2013/10/16 17:56:29
Can't make it private (the child classes need acce
|
| - ~GrTextContext(); |
| - |
| - void drawPackedGlyph(GrGlyph::PackedID, GrFixed left, GrFixed top, |
| - GrFontScaler*); |
| - |
| - void flush(); // optional; automatically called by destructor |
| - |
| -private: |
| - GrPaint fPaint; |
| - GrContext* fContext; |
| - GrDrawTarget* fDrawTarget; |
| - |
| - GrFontScaler* fScaler; |
| - GrTextStrike* fStrike; |
| + virtual ~GrTextContext(); |
| - inline void flushGlyphs(); |
| - void setupDrawTarget(); |
| + virtual void drawPackedGlyph(GrGlyph::PackedID, GrFixed left, GrFixed top, |
| + GrFontScaler*) = 0; |
| - enum { |
| - kMinRequestedGlyphs = 1, |
| - kDefaultRequestedGlyphs = 64, |
| - kMinRequestedVerts = kMinRequestedGlyphs * 4, |
| - kDefaultRequestedVerts = kDefaultRequestedGlyphs * 4, |
| - }; |
| + virtual void flush() = 0; // optional |
|
bsalomon
2013/10/14 19:32:47
the comment now seems weird... as though overridin
jvanverth1
2013/10/16 17:56:29
Just removed it, no one seems to be using it.
|
| - SkPoint* fVertices; |
| - int32_t fMaxVertices; |
| - GrTexture* fCurrTexture; |
| - int fCurrVertex; |
| +protected: |
| + GrPaint fPaint; |
| + GrContext* fContext; |
| + GrDrawTarget* fDrawTarget; |
| - SkIRect fClipRect; |
| - GrContext::AutoMatrix fAutoMatrix; |
| + SkIRect fClipRect; |
| + GrContext::AutoMatrix fAutoMatrix; |
| }; |
| #endif |