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

Unified Diff: src/gpu/GrDistanceFieldTextContext.h

Issue 150743002: Replace factory generation of TextContexts with persistent objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: And an if statement Created 6 years, 11 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/GrBitmapTextContext.cpp ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDistanceFieldTextContext.h
diff --git a/src/gpu/GrDistanceFieldTextContext.h b/src/gpu/GrDistanceFieldTextContext.h
index 8b94038b678429b72d31f35457e8ad6264cd3e7f..212989890a649dc15ab664624904ff972e13d24a 100755
--- a/src/gpu/GrDistanceFieldTextContext.h
+++ b/src/gpu/GrDistanceFieldTextContext.h
@@ -17,24 +17,26 @@ class GrTextStrike;
*/
class GrDistanceFieldTextContext : public GrTextContext {
public:
- virtual void drawText(const char text[], size_t byteLength, SkScalar x, SkScalar y) SK_OVERRIDE;
- virtual void drawPosText(const char text[], size_t byteLength,
+ GrDistanceFieldTextContext(GrContext*, const SkDeviceProperties&);
+ virtual ~GrDistanceFieldTextContext();
+
+ 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&,
+ const char text[], size_t byteLength,
const SkScalar pos[], SkScalar constY,
int scalarsPerPosition) SK_OVERRIDE;
- static bool CanDraw(const SkPaint& paint, const SkMatrix& ctm);
+ virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE;
private:
- GrDistanceFieldTextContext(GrContext*, const GrPaint&, const SkPaint&,
- const SkDeviceProperties&);
- virtual ~GrDistanceFieldTextContext();
- friend class GrTTextContextManager<GrDistanceFieldTextContext>;
-
GrTextStrike* fStrike;
SkScalar fTextRatio;
+ void init(const GrPaint&, const SkPaint&);
void drawPackedGlyph(GrGlyph::PackedID, GrFixed left, GrFixed top, GrFontScaler*);
void flushGlyphs(); // automatically called by destructor
+ void finish();
enum {
kMinRequestedGlyphs = 1,
« no previous file with comments | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698