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

Unified Diff: include/gpu/GrTextContext.h

Issue 27199002: Split out GrBitmapTextContext from GrTextContext. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Update based on comments 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
« no previous file with comments | « include/gpu/GrBitmapTextContext.h ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrTextContext.h
diff --git a/include/gpu/GrTextContext.h b/include/gpu/GrTextContext.h
index 5204da4b01efa4f022a9fe47403dc0a6dfc409bb..b367cf228d57fd5c0103cbb77332bc7b7a0dd4ae 100644
--- a/include/gpu/GrTextContext.h
+++ b/include/gpu/GrTextContext.h
@@ -13,45 +13,28 @@
#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:
+ virtual void drawPackedGlyph(GrGlyph::PackedID, GrFixed left, GrFixed top,
+ GrFontScaler*) = 0;
+
+protected:
GrTextContext(GrContext*, const GrPaint&);
- ~GrTextContext();
+ virtual ~GrTextContext() {}
- void drawPackedGlyph(GrGlyph::PackedID, GrFixed left, GrFixed top,
- GrFontScaler*);
+ GrPaint fPaint;
+ GrContext* fContext;
+ GrDrawTarget* fDrawTarget;
- void flush(); // optional; automatically called by destructor
+ SkIRect fClipRect;
private:
- GrPaint fPaint;
- GrContext* fContext;
- GrDrawTarget* fDrawTarget;
-
- GrFontScaler* fScaler;
- GrTextStrike* fStrike;
-
- inline void flushGlyphs();
- void setupDrawTarget();
-
- enum {
- kMinRequestedGlyphs = 1,
- kDefaultRequestedGlyphs = 64,
- kMinRequestedVerts = kMinRequestedGlyphs * 4,
- kDefaultRequestedVerts = kDefaultRequestedGlyphs * 4,
- };
-
- SkPoint* fVertices;
- int32_t fMaxVertices;
- GrTexture* fCurrTexture;
- int fCurrVertex;
-
- SkIRect fClipRect;
- GrContext::AutoMatrix fAutoMatrix;
};
#endif
« no previous file with comments | « include/gpu/GrBitmapTextContext.h ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698