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

Unified Diff: skia/ext/SkFontHost_fontconfig_impl.h

Issue 507037: Returns an error immediately without sending IPC message when a font family n... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | « skia/ext/SkFontHost_fontconfig_direct.cpp ('k') | skia/ext/SkFontHost_fontconfig_ipc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/SkFontHost_fontconfig_impl.h
===================================================================
--- skia/ext/SkFontHost_fontconfig_impl.h (revision 34817)
+++ skia/ext/SkFontHost_fontconfig_impl.h (working copy)
@@ -38,7 +38,8 @@
* @param fileid the fileid (as returned by this function) which we are
* trying to match.
* @param family (optional) the family of the font that we are trying to
- * match.
+ * match. If the length of the |family| is greater then
+ * kMaxFontFamilyLength, this function should immediately return false.
* @param is_bold (optional, set to NULL to ignore, in/out)
* @param is_italic (optional, set to NULL to ignore, in/out)
* @return true iff successful.
@@ -55,6 +56,8 @@
/** Open a font file given the fileid as returned by Match
*/
virtual int Open(unsigned fileid) = 0;
+
+ static const unsigned kMaxFontFamilyLength = 2048;
};
#endif // FontConfigInterface_DEFINED
« no previous file with comments | « skia/ext/SkFontHost_fontconfig_direct.cpp ('k') | skia/ext/SkFontHost_fontconfig_ipc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698