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

Unified Diff: src/gpu/GrBitmapTextContext.h

Issue 641613003: Rearrange code in TextContexts to be more consistent. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Some more indention clean up Created 6 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 | « no previous file | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBitmapTextContext.h
diff --git a/src/gpu/GrBitmapTextContext.h b/src/gpu/GrBitmapTextContext.h
index c136270c65bf39e064e97feee17db500cbdd636e..4bff399ade53632eb8603c93e6dc2e9b262e5570 100644
--- a/src/gpu/GrBitmapTextContext.h
+++ b/src/gpu/GrBitmapTextContext.h
@@ -21,6 +21,8 @@ public:
GrBitmapTextContext(GrContext*, const SkDeviceProperties&);
virtual ~GrBitmapTextContext();
+ 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&,
@@ -28,16 +30,7 @@ public:
const SkScalar pos[], int scalarsPerPosition,
const SkPoint& offset) SK_OVERRIDE;
- virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE;
-
private:
- GrTextStrike* fStrike;
-
- void init(const GrPaint&, const SkPaint&);
- void drawPackedGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*);
- void flushGlyphs(); // automatically called by destructor
- void finish();
-
enum {
kMinRequestedGlyphs = 1,
kDefaultRequestedGlyphs = 64,
@@ -45,6 +38,7 @@ private:
kDefaultRequestedVerts = kDefaultRequestedGlyphs * 4,
};
+ GrTextStrike* fStrike;
void* fVertices;
int32_t fMaxVertices;
GrTexture* fCurrTexture;
@@ -53,6 +47,12 @@ private:
uint32_t fEffectTextureUniqueID;
int fCurrVertex;
SkRect fVertexBounds;
+
+ void init(const GrPaint&, const SkPaint&);
+ void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*);
+ void flush(); // automatically called by destructor
+ void finish();
+
};
#endif
« no previous file with comments | « no previous file | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698