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

Unified Diff: src/gpu/GrTextContext.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 | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextContext.h
diff --git a/src/gpu/GrTextContext.h b/src/gpu/GrTextContext.h
index da41c1bb3ca619146c4296318f5835ce32b18859..b82a64840b1f95d28a96bd20bfc0b0f4fbf6139a 100644
--- a/src/gpu/GrTextContext.h
+++ b/src/gpu/GrTextContext.h
@@ -24,6 +24,9 @@ class GrFontScaler;
class GrTextContext {
public:
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&,
@@ -31,18 +34,7 @@ public:
const SkScalar pos[], int scalarsPerPosition,
const SkPoint& offset) = 0;
- virtual bool canDraw(const SkPaint& paint) = 0;
-
protected:
- GrTextContext(GrContext*, const SkDeviceProperties&);
-
- static GrFontScaler* GetGrFontScaler(SkGlyphCache* cache);
- static void MeasureText(SkGlyphCache* cache, SkDrawCacheProc glyphCacheProc,
- const char text[], size_t byteLength, SkVector* stopVector);
-
- void init(const GrPaint&, const SkPaint&);
- void finish() { fDrawTarget = NULL; }
-
GrContext* fContext;
SkDeviceProperties fDeviceProperties;
@@ -50,6 +42,15 @@ protected:
SkIRect fClipRect;
GrPaint fPaint;
SkPaint fSkPaint;
+
+ GrTextContext(GrContext*, const SkDeviceProperties&);
+
+ void init(const GrPaint&, const SkPaint&);
+ void finish() { fDrawTarget = NULL; }
+
+ static GrFontScaler* GetGrFontScaler(SkGlyphCache* cache);
+ static void MeasureText(SkGlyphCache* cache, SkDrawCacheProc glyphCacheProc,
+ const char text[], size_t byteLength, SkVector* stopVector);
};
#endif
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698