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

Unified Diff: include/gpu/GrBitmapTextContext.h

Issue 135683006: Add fallback code for TextContexts that don't support all features (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | include/gpu/GrDistanceFieldTextContext.h » ('j') | include/gpu/GrTextContext.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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*);
« no previous file with comments | « no previous file | include/gpu/GrDistanceFieldTextContext.h » ('j') | include/gpu/GrTextContext.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698