Index: third_party/harfbuzz-ng/src/hb-face.cc |
diff --git a/third_party/harfbuzz-ng/src/hb-face.cc b/third_party/harfbuzz-ng/src/hb-face.cc |
index 1ba970707275fd60d7104f2118743ec24b500c2e..1800c995a46797b13cae00e4590f335ec24a7800 100644 |
--- a/third_party/harfbuzz-ng/src/hb-face.cc |
+++ b/third_party/harfbuzz-ng/src/hb-face.cc |
@@ -51,6 +51,8 @@ const hb_face_t _hb_face_nil = { |
1000, /* upem */ |
0, /* num_glyphs */ |
+ hb_face_t::NOTHING, /* dirty */ |
+ |
{ |
#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID, |
#include "hb-shaper-list.hh" |
@@ -171,7 +173,7 @@ hb_face_create (hb_blob_t *blob, |
closure, |
(hb_destroy_func_t) _hb_face_for_data_closure_destroy); |
- hb_face_set_index (face, index); |
+ face->index = index; |
return face; |
} |
@@ -365,6 +367,11 @@ hb_face_set_index (hb_face_t *face, |
if (face->immutable) |
return; |
+ if (face->index == index) |
+ return; |
+ |
+ face->dirty |= face->INDEX; |
+ |
face->index = index; |
} |
@@ -400,6 +407,11 @@ hb_face_set_upem (hb_face_t *face, |
if (face->immutable) |
return; |
+ if (face->upem == upem) |
+ return; |
+ |
+ face->dirty |= face->UPEM; |
+ |
face->upem = upem; |
} |
@@ -444,6 +456,11 @@ hb_face_set_glyph_count (hb_face_t *face, |
if (face->immutable) |
return; |
+ if (face->num_glyphs == glyph_count) |
+ return; |
+ |
+ face->dirty |= face->NUM_GLYPHS; |
+ |
face->num_glyphs = glyph_count; |
} |