diff --git a/src/hb-face-private.hh b/src/hb-face-private.hh index 72f08a599ad6c0579aa1a3d269c3936fcbf0ffa7..43e7b1cb3ff7edb99e8a3ce976c34431b539d154 100644 --- a/src/hb-face-private.hh +++ b/src/hb-face-private.hh @@ -54,13 +54,6 @@ struct hb_face_t { mutable unsigned int upem; /* Units-per-EM. */ mutable unsigned int num_glyphs; /* Number of glyphs. */ - enum dirty_t { - DIRTY_NOTHING = 0x0000, - DIRTY_INDEX = 0x0001, - DIRTY_UPEM = 0x0002, - DIRTY_NUM_GLYPHS = 0x0004, - } dirty; - struct hb_shaper_data_t shaper_data; /* Various shaper data. */ /* Various non-shaping data. */ @@ -106,8 +99,6 @@ struct hb_face_t { HB_INTERNAL void load_num_glyphs (void) const; }; -HB_MARK_AS_FLAG_T (hb_face_t::dirty_t); - extern HB_INTERNAL const hb_face_t _hb_face_nil; #define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS diff --git a/src/hb-face.cc b/src/hb-face.cc index 22998f00586b9d4f34b831db8fe9118df8e48452..d7d736d7bfa4b57a1e396e53b95da2fc754a329b 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc @@ -51,8 +51,6 @@ const hb_face_t _hb_face_nil = { 1000, /* upem */ 0, /* num_glyphs */ - hb_face_t::DIRTY_NOTHING, /* dirty */ - { #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID, #include "hb-shaper-list.hh" @@ -367,11 +365,6 @@ hb_face_set_index (hb_face_t *face, if (face->immutable) return; - if (face->index == index) - return; - - face->dirty |= face->DIRTY_INDEX; - face->index = index; } @@ -407,11 +400,6 @@ hb_face_set_upem (hb_face_t *face, if (face->immutable) return; - if (face->upem == upem) - return; - - face->dirty |= face->DIRTY_UPEM; - face->upem = upem; } @@ -456,11 +444,6 @@ hb_face_set_glyph_count (hb_face_t *face, if (face->immutable) return; - if (face->num_glyphs == glyph_count) - return; - - face->dirty |= face->DIRTY_NUM_GLYPHS; - face->num_glyphs = glyph_count; } diff --git a/src/hb-font-private.hh b/src/hb-font-private.hh index 30661c322d825ca2758ed8e94735bdf194e24532..d2801fb86ec1d9d4d84a026bb8cf2faa9e787c2a 100644 --- a/src/hb-font-private.hh +++ b/src/hb-font-private.hh @@ -118,17 +118,6 @@ struct hb_font_t { void *user_data; hb_destroy_func_t destroy; - enum dirty_t { - DIRTY_NOTHING = 0x0000, - DIRTY_FACE = 0x0001, - DIRTY_PARENT = 0x0002, - DIRTY_FUNCS = 0x0004, - DIRTY_SCALE = 0x0008, - DIRTY_PPEM = 0x0010, - DIRTY_PTEM = 0x0020, - DIRTY_VARIATIONS = 0x0040, - } dirty; - struct hb_shaper_data_t shaper_data; @@ -556,8 +545,6 @@ struct hb_font_t { } }; -HB_MARK_AS_FLAG_T (hb_font_t::dirty_t); - #define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_PROTOTYPE(shaper, font); #include "hb-shaper-list.hh" diff --git a/src/hb-font.cc b/src/hb-font.cc index c47e2c14a76599178782840885a9cb5dfe406e90..888420792f3efec9b3fd13d6f40d55ad8af2323e 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -1209,8 +1209,6 @@ hb_font_get_empty (void) NULL, /* user_data */ NULL, /* destroy */ - hb_font_t::DIRTY_NOTHING, /* dirty */ - { #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID, #include "hb-shaper-list.hh" @@ -1363,11 +1361,6 @@ hb_font_set_parent (hb_font_t *font, if (!parent) parent = hb_font_get_empty (); - if (parent == font->parent) - return; - - font->dirty |= font->DIRTY_PARENT; - hb_font_t *old = font->parent; font->parent = hb_font_reference (parent); @@ -1410,11 +1403,6 @@ hb_font_set_face (hb_font_t *font, if (unlikely (!face)) face = hb_face_get_empty (); - if (font->face == face) - return; - - font->dirty |= font->DIRTY_FACE; - hb_face_t *old = font->face; font->face = hb_face_reference (face); @@ -1468,8 +1456,6 @@ hb_font_set_funcs (hb_font_t *font, if (!klass) klass = hb_font_funcs_get_empty (); - font->dirty |= font->DIRTY_FUNCS; - hb_font_funcs_reference (klass); hb_font_funcs_destroy (font->klass); font->klass = klass; @@ -1525,11 +1511,6 @@ hb_font_set_scale (hb_font_t *font, if (font->immutable) return; - if (font->x_scale == x_scale && font->y_scale == y_scale) - return; - - font->dirty |= font->DIRTY_SCALE; - font->x_scale = x_scale; font->y_scale = y_scale; } @@ -1571,11 +1552,6 @@ hb_font_set_ppem (hb_font_t *font, if (font->immutable) return; - if (font->x_ppem == x_ppem && font->y_ppem == y_ppem) - return; - - font->dirty |= font->DIRTY_PPEM; - font->x_ppem = x_ppem; font->y_ppem = y_ppem; } @@ -1614,11 +1590,6 @@ hb_font_set_ptem (hb_font_t *font, float ptem) if (font->immutable) return; - if (font->ptem == ptem) - return; - - font->dirty |= font->DIRTY_PTEM; - font->ptem = ptem; } @@ -1647,16 +1618,6 @@ _hb_font_adopt_var_coords_normalized (hb_font_t *font, int *coords, /* 2.14 normalized */ unsigned int coords_length) { - if (font->num_coords == coords_length && - (coords_length == 0 || - 0 == memcmp (font->coords, coords, coords_length * sizeof (coords[0])))) - { - free (coords); - return; - } - - font->dirty |= font->DIRTY_VARIATIONS; - free (font->coords); font->coords = coords;