提交 f1aaa2a4 编写于 作者: B Behdad Esfahbod

Add TODO

上级 33d4d432
...@@ -177,7 +177,6 @@ hb_ft_face_create (FT_Face ft_face, ...@@ -177,7 +177,6 @@ hb_ft_face_create (FT_Face ft_face,
{ {
hb_face_t *face; hb_face_t *face;
/* TODO: Handle NULL ft_face (in other places too) */
if (ft_face->stream->read == NULL) { if (ft_face->stream->read == NULL) {
hb_blob_t *blob; hb_blob_t *blob;
...@@ -204,7 +203,6 @@ hb_ft_face_finalize (FT_Face ft_face) ...@@ -204,7 +203,6 @@ hb_ft_face_finalize (FT_Face ft_face)
hb_face_t * hb_face_t *
hb_ft_face_create_cached (FT_Face ft_face) hb_ft_face_create_cached (FT_Face ft_face)
{ {
/* TODO: Not thread-safe */
if (HB_UNLIKELY (!ft_face->generic.data || ft_face->generic.finalizer != (FT_Generic_Finalizer) hb_ft_face_finalize)) if (HB_UNLIKELY (!ft_face->generic.data || ft_face->generic.finalizer != (FT_Generic_Finalizer) hb_ft_face_finalize))
{ {
if (ft_face->generic.finalizer) if (ft_face->generic.finalizer)
......
...@@ -43,6 +43,7 @@ hb_face_t * ...@@ -43,6 +43,7 @@ hb_face_t *
hb_ft_face_create (FT_Face ft_face, hb_ft_face_create (FT_Face ft_face,
hb_destroy_func_t destroy); hb_destroy_func_t destroy);
/* Note: This function is not thread-safe */
hb_face_t * hb_face_t *
hb_ft_face_create_cached (FT_Face ft_face); hb_ft_face_create_cached (FT_Face ft_face);
......
...@@ -84,7 +84,7 @@ typedef struct OffsetTable ...@@ -84,7 +84,7 @@ typedef struct OffsetTable
{ {
Tag t; Tag t;
t.set (tag); t.set (tag);
// TODO: bsearch (need to sort in sanitize) /* TODO: bsearch (need to sort in sanitize) */
unsigned int count = numTables; unsigned int count = numTables;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
{ {
......
...@@ -366,6 +366,8 @@ struct Sanitizer ...@@ -366,6 +366,8 @@ struct Sanitizer
template <typename Type, int Bytes> class BEInt; template <typename Type, int Bytes> class BEInt;
/* LONGTERMTODO: On machines allowing unaligned access, we can make the
* following tighter by using byteswap instructions on ints directly. */
template <typename Type> template <typename Type>
class BEInt<Type, 2> class BEInt<Type, 2>
{ {
......
...@@ -87,7 +87,7 @@ struct RecordArrayOf : ArrayOf<Record<Type> > { ...@@ -87,7 +87,7 @@ struct RecordArrayOf : ArrayOf<Record<Type> > {
{ {
Tag t; Tag t;
t.set (tag); t.set (tag);
// TODO: bsearch (need to sort in sanitize) /* TODO: bsearch (need to sort in sanitize) */
const Record<Type> *a = this->array(); const Record<Type> *a = this->array();
unsigned int count = this->len; unsigned int count = this->len;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
...@@ -235,8 +235,8 @@ struct Feature ...@@ -235,8 +235,8 @@ struct Feature
return SANITIZE_SELF () && SANITIZE (lookupIndex); return SANITIZE_SELF () && SANITIZE (lookupIndex);
} }
/* TODO: implement get_feature_parameters() */ /* LONGTERMTODO: implement get_feature_parameters() */
/* TODO: implement FeatureSize and other special features? */ /* LONGTERMTODO: implement FeatureSize and other special features? */
Offset featureParams; /* Offset to Feature Parameters table (if one Offset featureParams; /* Offset to Feature Parameters table (if one
* has been defined for the feature), relative * has been defined for the feature), relative
* to the beginning of the Feature Table; = Null * to the beginning of the Feature Table; = Null
...@@ -321,7 +321,7 @@ struct CoverageFormat1 ...@@ -321,7 +321,7 @@ struct CoverageFormat1
return NOT_COVERED; return NOT_COVERED;
GlyphID gid; GlyphID gid;
gid.set (glyph_id); gid.set (glyph_id);
// TODO: bsearch (need to sort in sanitize) /* TODO: bsearch (need to sort in sanitize) */
unsigned int num_glyphs = glyphArray.len; unsigned int num_glyphs = glyphArray.len;
for (unsigned int i = 0; i < num_glyphs; i++) for (unsigned int i = 0; i < num_glyphs; i++)
if (gid == glyphArray[i]) if (gid == glyphArray[i])
...@@ -377,7 +377,7 @@ struct CoverageFormat2 ...@@ -377,7 +377,7 @@ struct CoverageFormat2
private: private:
inline unsigned int get_coverage (hb_codepoint_t glyph_id) const inline unsigned int get_coverage (hb_codepoint_t glyph_id) const
{ {
// TODO: bsearch (need to sort in sanitize) /* TODO: bsearch (need to sort in sanitize) */
unsigned int count = rangeRecord.len; unsigned int count = rangeRecord.len;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
{ {
...@@ -497,7 +497,7 @@ struct ClassDefFormat2 ...@@ -497,7 +497,7 @@ struct ClassDefFormat2
private: private:
inline hb_ot_layout_class_t get_class (hb_codepoint_t glyph_id) const inline hb_ot_layout_class_t get_class (hb_codepoint_t glyph_id) const
{ {
// TODO: bsearch (need to sort in sanitize) /* TODO: bsearch (need to sort in sanitize) */
unsigned int count = rangeRecord.len; unsigned int count = rangeRecord.len;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册