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

Unified Diff: include/gpu/GrTextContext.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: Fix nits 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/GrDistanceFieldTextContext.h ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrTextContext.h
diff --git a/include/gpu/GrTextContext.h b/include/gpu/GrTextContext.h
index 273e0947b11d92b6c4daaf3ba912271b87196c7e..c572d0d016e264e2eeee34b654972ba6addecb77 100644
--- a/include/gpu/GrTextContext.h
+++ b/include/gpu/GrTextContext.h
@@ -29,7 +29,7 @@ public:
virtual void drawPosText(const char text[], size_t byteLength,
const SkScalar pos[], SkScalar constY,
int scalarsPerPosition) = 0;
-
+
protected:
GrTextContext(GrContext*, const GrPaint&, const SkPaint&, const SkDeviceProperties&);
@@ -55,6 +55,7 @@ public:
virtual ~GrTextContextManager() {}
virtual GrTextContext* create(GrContext* grContext, const GrPaint& grPaint,
const SkPaint& skPaint, const SkDeviceProperties& props) = 0;
+ virtual bool canDraw(const SkPaint& paint, const SkMatrix& ctm) = 0;
};
template <class TextContextClass>
@@ -110,6 +111,10 @@ public:
return obj;
}
+ virtual bool canDraw(const SkPaint& paint, const SkMatrix& ctm) SK_OVERRIDE {
+ return TextContextClass::CanDraw(paint, ctm);
+ }
+
private:
void recycle(GrTextContext* textContext) {
SkASSERT((void*)textContext == fAllocation);
« no previous file with comments | « include/gpu/GrDistanceFieldTextContext.h ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698