Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: include/gpu/GrTextContext.h

Issue 27199002: Split out GrBitmapTextContext from GrTextContext. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rebase to ToT Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698