[HarfBuzz] harfbuzz: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sun Nov 11 16:42:33 UTC 2018
src/hb-blob.hh | 1 +
src/hb-ot-cmap-table.hh | 2 +-
src/hb-ot-color-cbdt-table.hh | 4 ++--
src/hb-ot-color-sbix-table.hh | 2 +-
src/hb-ot-color-svg-table.hh | 2 +-
src/hb-ot-glyf-table.hh | 4 ++--
src/hb-ot-hmtx-table.hh | 6 +++---
src/hb-ot-layout-gdef-table.hh | 2 +-
src/hb-ot-layout-gsubgpos.hh | 2 +-
src/hb-ot-name-table.hh | 2 +-
src/hb-ot-post-table.hh | 2 +-
11 files changed, 15 insertions(+), 14 deletions(-)
New commits:
commit da6aa3b0333de3f2169a5cfcb33374e1b2fe346e
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Nov 11 11:40:57 2018 -0500
Add hb_blob_ptr_t.destroy()
diff --git a/src/hb-blob.hh b/src/hb-blob.hh
index 1b7d4bed..802b1f07 100644
--- a/src/hb-blob.hh
+++ b/src/hb-blob.hh
@@ -97,6 +97,7 @@ struct hb_blob_ptr_t
inline const T * get (void) const { return b->as<T> (); }
inline hb_blob_t * get_blob (void) const { return b.get_raw (); }
inline unsigned int get_length (void) const { return b.get ()->length; }
+ inline void destroy (void) { hb_blob_destroy (b.get ()); b = nullptr; }
hb_nonnull_ptr_t<hb_blob_t> b;
};
diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh
index 8d94ad31..4c24cb99 100644
--- a/src/hb-ot-cmap-table.hh
+++ b/src/hb-ot-cmap-table.hh
@@ -1050,7 +1050,7 @@ struct cmap
inline void fini (void)
{
- hb_blob_destroy (this->table.get_blob ());
+ this->table.destroy ();
}
inline bool get_nominal_glyph (hb_codepoint_t unicode,
diff --git a/src/hb-ot-color-cbdt-table.hh b/src/hb-ot-color-cbdt-table.hh
index 0a8f4e1a..47774fd8 100644
--- a/src/hb-ot-color-cbdt-table.hh
+++ b/src/hb-ot-color-cbdt-table.hh
@@ -392,8 +392,8 @@ struct CBDT
inline void fini (void)
{
- hb_blob_destroy (this->cblc.get_blob ());
- hb_blob_destroy (this->cbdt.get_blob ());
+ this->cblc.destroy ();
+ this->cbdt.destroy ();
}
inline bool get_extents (hb_font_t *font, hb_codepoint_t glyph,
diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh
index 64ebb63e..80d65022 100644
--- a/src/hb-ot-color-sbix-table.hh
+++ b/src/hb-ot-color-sbix-table.hh
@@ -146,7 +146,7 @@ struct sbix
inline void fini (void)
{
- hb_blob_destroy (table.get_blob ());
+ table.destroy ();
}
inline bool has_data () const
diff --git a/src/hb-ot-color-svg-table.hh b/src/hb-ot-color-svg-table.hh
index 37b28ea6..bad8ef54 100644
--- a/src/hb-ot-color-svg-table.hh
+++ b/src/hb-ot-color-svg-table.hh
@@ -86,7 +86,7 @@ struct SVG
inline void fini (void)
{
- hb_blob_destroy (table.get_blob ());
+ table.destroy ();
}
inline hb_blob_t *reference_blob_for_glyph (hb_codepoint_t glyph_id) const
diff --git a/src/hb-ot-glyf-table.hh b/src/hb-ot-glyf-table.hh
index 43b921e2..42bb03ff 100644
--- a/src/hb-ot-glyf-table.hh
+++ b/src/hb-ot-glyf-table.hh
@@ -254,8 +254,8 @@ struct glyf
inline void fini (void)
{
- hb_blob_destroy (loca_table.get_blob ());
- hb_blob_destroy (glyf_table.get_blob ());
+ loca_table.destroy ();
+ glyf_table.destroy ();
}
/*
diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh
index 7a1eb799..20948edb 100644
--- a/src/hb-ot-hmtx-table.hh
+++ b/src/hb-ot-hmtx-table.hh
@@ -234,7 +234,7 @@ struct hmtxvmtx
if (unlikely (!num_advances))
{
num_metrics = num_advances = 0;
- hb_blob_destroy (table.get_blob ());
+ table.destroy ();
table = hb_blob_get_empty ();
}
@@ -243,8 +243,8 @@ struct hmtxvmtx
inline void fini (void)
{
- hb_blob_destroy (table.get_blob ());
- hb_blob_destroy (var_table.get_blob ());
+ table.destroy ();
+ var_table.destroy ();
}
/* TODO Add variations version. */
diff --git a/src/hb-ot-layout-gdef-table.hh b/src/hb-ot-layout-gdef-table.hh
index aa6ffc88..e6804e6b 100644
--- a/src/hb-ot-layout-gdef-table.hh
+++ b/src/hb-ot-layout-gdef-table.hh
@@ -412,7 +412,7 @@ struct GDEF
inline void fini (void)
{
- hb_blob_destroy (this->table.get_blob ());
+ this->table.destroy ();
}
hb_blob_ptr_t<GDEF> table;
diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh
index 2a89d495..1335601a 100644
--- a/src/hb-ot-layout-gsubgpos.hh
+++ b/src/hb-ot-layout-gsubgpos.hh
@@ -2769,7 +2769,7 @@ struct GSUBGPOS
for (unsigned int i = 0; i < this->lookup_count; i++)
this->accels[i].fini ();
free (this->accels);
- hb_blob_destroy (this->table.get_blob ());
+ this->table.destroy ();
}
hb_blob_ptr_t<T> table;
diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh
index 5aa06813..ab07b719 100644
--- a/src/hb-ot-name-table.hh
+++ b/src/hb-ot-name-table.hh
@@ -220,7 +220,7 @@ struct name
inline void fini (void)
{
this->names.fini ();
- hb_blob_destroy (this->table.get_blob ());
+ this->table.destroy ();
}
inline int get_index (hb_ot_name_id_t name_id,
diff --git a/src/hb-ot-post-table.hh b/src/hb-ot-post-table.hh
index 48505814..557fefad 100644
--- a/src/hb-ot-post-table.hh
+++ b/src/hb-ot-post-table.hh
@@ -123,7 +123,7 @@ struct post
{
index_to_offset.fini ();
free (gids_sorted_by_name.get ());
- hb_blob_destroy (table.get_blob ());
+ table.destroy ();
}
inline bool get_glyph_name (hb_codepoint_t glyph,
More information about the HarfBuzz
mailing list