Index: include/gpu/GrBitmapTextContext.h |
diff --git a/include/gpu/GrBitmapTextContext.h b/include/gpu/GrBitmapTextContext.h |
index c66f8a856431343042679e8d33d8b4ae615dc70a..bb9891e1a6312184abff259c9cbaf2035a1b7d3a 100755 |
--- a/include/gpu/GrBitmapTextContext.h |
+++ b/include/gpu/GrBitmapTextContext.h |
@@ -10,6 +10,8 @@ |
#include "GrTextContext.h" |
+#include "SkDraw.h" |
+ |
class GrTextStrike; |
/* |
@@ -17,16 +19,19 @@ class GrTextStrike; |
*/ |
class GrBitmapTextContext : public GrTextContext { |
public: |
+ GrBitmapTextContext(GrContext*, const GrPaint&, const SkPaint&, 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, |
const SkScalar pos[], SkScalar constY, |
int scalarsPerPosition) SK_OVERRIDE; |
-private: |
- GrBitmapTextContext(GrContext*, const GrPaint&, const SkPaint&, const SkDeviceProperties&); |
- virtual ~GrBitmapTextContext(); |
- friend class GrTTextContextManager<GrBitmapTextContext>; |
+ static bool CanDraw(const SkPaint& paint, const SkMatrix& ctm) { |
+ return !SkDraw::ShouldDrawTextAsPaths(paint, ctm); |
reed1
2014/01/29 17:18:56
If we move this impl into the .cpp, can we not add
jvanverth1
2014/01/29 19:25:59
Done.
|
+ } |
+private: |
GrTextStrike* fStrike; |
void drawPackedGlyph(GrGlyph::PackedID, GrFixed left, GrFixed top, GrFontScaler*); |