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

Unified Diff: src/gpu/GrBitmapTextContext.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 | « include/gpu/SkGpuDevice.h ('k') | 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 6550e3c0793db29ce8cde8b42026f1c205b1c53e..8d6edda9258402caec8933cb2e71c720f51d69de 100755
--- a/src/gpu/GrBitmapTextContext.h
+++ b/src/gpu/GrBitmapTextContext.h
@@ -17,21 +17,25 @@ class GrTextStrike;
*/
class GrBitmapTextContext : public GrTextContext {
public:
- GrBitmapTextContext(GrContext*, const GrPaint&, const SkPaint&, const SkDeviceProperties&);
+ GrBitmapTextContext(GrContext*, const SkDeviceProperties&);
virtual ~GrBitmapTextContext();
- virtual void drawText(const char text[], size_t byteLength, SkScalar x, SkScalar y) SK_OVERRIDE;
- virtual void drawPosText(const char text[], size_t byteLength,
+ 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:
GrTextStrike* fStrike;
+ 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 | « include/gpu/SkGpuDevice.h ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698