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

Unified Diff: include/core/SkTypeface.h

Issue 18484005: allow createScalerContext to return null, and then have the GDI backend trigger that if we fail to … (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | src/core/SkGlyphCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTypeface.h
diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h
index 9c23fb200ba7aca3db006fc3388dca428716bef4..c84ae288a6782d47d5c284ce2c56e8359a86cb64 100644
--- a/include/core/SkTypeface.h
+++ b/include/core/SkTypeface.h
@@ -231,7 +231,14 @@ public:
* collection.
*/
SkStream* openStream(int* ttcIndex) const;
- SkScalerContext* createScalerContext(const SkDescriptor*) const;
+
+ /**
+ * Return a scalercontext for the given descriptor. If this fails, then
+ * if allowFailure is true, this returns NULL, else it returns a
+ * dummy scalercontext that will not crash, but will draw nothing.
+ */
+ SkScalerContext* createScalerContext(const SkDescriptor*,
+ bool allowFailure = false) const;
// PRIVATE / EXPERIMENTAL -- do not call
void filterRec(SkScalerContextRec* rec) const {
« no previous file with comments | « no previous file | src/core/SkGlyphCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698