Coverage Report

Created: 2026-06-23 07:04

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/harfbuzz/src/hb-blob.hh
Line
Count
Source
1
/*
2
 * Copyright © 2009  Red Hat, Inc.
3
 * Copyright © 2018  Google, Inc.
4
 *
5
 *  This is part of HarfBuzz, a text shaping library.
6
 *
7
 * Permission is hereby granted, without written agreement and without
8
 * license or royalty fees, to use, copy, modify, and distribute this
9
 * software and its documentation for any purpose, provided that the
10
 * above copyright notice and the following two paragraphs appear in
11
 * all copies of this software.
12
 *
13
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
14
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
15
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
16
 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
17
 * DAMAGE.
18
 *
19
 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
20
 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
21
 * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
22
 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
23
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24
 *
25
 * Red Hat Author(s): Behdad Esfahbod
26
 * Google Author(s): Behdad Esfahbod
27
 */
28
29
#ifndef HB_BLOB_HH
30
#define HB_BLOB_HH
31
32
#include "hb.hh"
33
34
35
/*
36
 * hb_blob_t
37
 */
38
39
struct hb_blob_t
40
{
41
5.65k
  ~hb_blob_t () { destroy_user_data (); }
42
43
  void destroy_user_data ()
44
5.65k
  {
45
5.65k
    if (destroy)
46
5.65k
    {
47
5.65k
      destroy (user_data);
48
5.65k
      user_data = nullptr;
49
5.65k
      destroy = nullptr;
50
5.65k
    }
51
5.65k
  }
52
53
  void replace_buffer (const char       *new_data,
54
           unsigned          new_length,
55
           hb_memory_mode_t  new_mode,
56
           void             *new_user_data,
57
           hb_destroy_func_t new_destroy)
58
0
  {
59
0
    if (new_data != data)
60
0
      destroy_user_data ();
61
0
    data = new_data;
62
0
    length = new_length;
63
0
    mode = new_mode;
64
0
    user_data = new_user_data;
65
0
    destroy = new_destroy;
66
0
  }
67
68
  HB_INTERNAL bool try_make_writable ();
69
  HB_INTERNAL bool try_make_writable_inplace ();
70
  HB_INTERNAL bool try_make_writable_inplace_unix ();
71
72
2.37M
  hb_bytes_t as_bytes () const { return hb_bytes_t (data, length); }
73
  template <typename Type>
74
2.37M
  const Type* as () const { return as_bytes ().as<Type> (); }
Unexecuted instantiation: OT::cmap const* hb_blob_t::as<OT::cmap>() const
Unexecuted instantiation: OT::OpenTypeFontFile const* hb_blob_t::as<OT::OpenTypeFontFile>() const
Unexecuted instantiation: OT::OS2 const* hb_blob_t::as<OT::OS2>() const
Unexecuted instantiation: OT::MVAR const* hb_blob_t::as<OT::MVAR>() const
OT::fvar const* hb_blob_t::as<OT::fvar>() const
Line
Count
Source
74
20.9k
  const Type* as () const { return as_bytes ().as<Type> (); }
Unexecuted instantiation: OT::hhea const* hb_blob_t::as<OT::hhea>() const
Unexecuted instantiation: OT::vhea const* hb_blob_t::as<OT::vhea>() const
OT::maxp const* hb_blob_t::as<OT::maxp>() const
Line
Count
Source
74
1.86k
  const Type* as () const { return as_bytes ().as<Type> (); }
Unexecuted instantiation: OT::gvar_GVAR<OT::NumType<true, unsigned short, 2u>, 1735811442u> const* hb_blob_t::as<OT::gvar_GVAR<OT::NumType<true, unsigned short, 2u>, 1735811442u> >() const
Unexecuted instantiation: OT::gvar_GVAR<OT::NumType<true, unsigned int, 3u>, 1196835154u> const* hb_blob_t::as<OT::gvar_GVAR<OT::NumType<true, unsigned int, 3u>, 1196835154u> >() const
Unexecuted instantiation: OT::hmtxvmtx<OT::hmtx, OT::hhea, OT::HVAR> const* hb_blob_t::as<OT::hmtxvmtx<OT::hmtx, OT::hhea, OT::HVAR> >() const
Unexecuted instantiation: OT::hmtxvmtx<OT::vmtx, OT::vhea, OT::VVAR> const* hb_blob_t::as<OT::hmtxvmtx<OT::vmtx, OT::vhea, OT::VVAR> >() const
Unexecuted instantiation: OT::head const* hb_blob_t::as<OT::head>() const
Unexecuted instantiation: OT::loca const* hb_blob_t::as<OT::loca>() const
Unexecuted instantiation: OT::glyf const* hb_blob_t::as<OT::glyf>() const
Unexecuted instantiation: OT::cff1 const* hb_blob_t::as<OT::cff1>() const
Unexecuted instantiation: OT::cff2 const* hb_blob_t::as<OT::cff2>() const
OT::GDEF const* hb_blob_t::as<OT::GDEF>() const
Line
Count
Source
74
1.63M
  const Type* as () const { return as_bytes ().as<Type> (); }
OT::Layout::GPOS const* hb_blob_t::as<OT::Layout::GPOS>() const
Line
Count
Source
74
339k
  const Type* as () const { return as_bytes ().as<Type> (); }
AAT::kerx const* hb_blob_t::as<AAT::kerx>() const
Line
Count
Source
74
4.12k
  const Type* as () const { return as_bytes ().as<Type> (); }
OT::kern const* hb_blob_t::as<OT::kern>() const
Line
Count
Source
74
4.79k
  const Type* as () const { return as_bytes ().as<Type> (); }
Unexecuted instantiation: OT::meta const* hb_blob_t::as<OT::meta>() const
Unexecuted instantiation: AAT::ltag const* hb_blob_t::as<AAT::ltag>() const
Unexecuted instantiation: OT::name const* hb_blob_t::as<OT::name>() const
Unexecuted instantiation: OT::post const* hb_blob_t::as<OT::post>() const
Unexecuted instantiation: OT::CBLC const* hb_blob_t::as<OT::CBLC>() const
Unexecuted instantiation: OT::CBDT const* hb_blob_t::as<OT::CBDT>() const
Unexecuted instantiation: OT::CPAL const* hb_blob_t::as<OT::CPAL>() const
Unexecuted instantiation: OT::COLR const* hb_blob_t::as<OT::COLR>() const
Unexecuted instantiation: OT::sbix const* hb_blob_t::as<OT::sbix>() const
Unexecuted instantiation: OT::sbix::accelerator_t::PNGHeader const* hb_blob_t::as<OT::sbix::accelerator_t::PNGHeader>() const
Unexecuted instantiation: OT::SVG const* hb_blob_t::as<OT::SVG>() const
OT::Layout::GSUB const* hb_blob_t::as<OT::Layout::GSUB>() const
Line
Count
Source
74
339k
  const Type* as () const { return as_bytes ().as<Type> (); }
Unexecuted instantiation: OT::VARC const* hb_blob_t::as<OT::VARC>() const
AAT::morx const* hb_blob_t::as<AAT::morx>() const
Line
Count
Source
74
5.98k
  const Type* as () const { return as_bytes ().as<Type> (); }
AAT::mort const* hb_blob_t::as<AAT::mort>() const
Line
Count
Source
74
5.98k
  const Type* as () const { return as_bytes ().as<Type> (); }
Unexecuted instantiation: OT::HVAR const* hb_blob_t::as<OT::HVAR>() const
Unexecuted instantiation: OT::VVAR const* hb_blob_t::as<OT::VVAR>() const
Unexecuted instantiation: OT::VORG const* hb_blob_t::as<OT::VORG>() const
Unexecuted instantiation: OT::STAT const* hb_blob_t::as<OT::STAT>() const
OT::avar const* hb_blob_t::as<OT::avar>() const
Line
Count
Source
74
10.4k
  const Type* as () const { return as_bytes ().as<Type> (); }
Unexecuted instantiation: AAT::ankr const* hb_blob_t::as<AAT::ankr>() const
AAT::trak const* hb_blob_t::as<AAT::trak>() const
Line
Count
Source
74
2.26k
  const Type* as () const { return as_bytes ().as<Type> (); }
Unexecuted instantiation: AAT::feat const* hb_blob_t::as<AAT::feat>() const
Unexecuted instantiation: OT::BASE const* hb_blob_t::as<OT::BASE>() const
75
76
  public:
77
  hb_object_header_t header;
78
79
  const char *data = nullptr;
80
  unsigned int length = 0;
81
  hb_memory_mode_t mode = (hb_memory_mode_t) 0;
82
83
  void *user_data = nullptr;
84
  hb_destroy_func_t destroy = nullptr;
85
86
  /*
87
   * Blob-recycling helpers.
88
   *
89
   * Encoders that produce a sized byte buffer and wrap it as an
90
   * hb_blob_t can amortize malloc/blob-allocation across repeated
91
   * renders by handing the output blob back via a recycle slot.  On
92
   * the next encode these helpers reuse (or realloc) the buffer and
93
   * the same hb_blob_t handle is returned, skipping malloc/free
94
   * and blob-handle churn across glyph-by-glyph encoding loops.
95
   *
96
   * Blobs managed by this machinery are identified by the address
97
   * of recycle_data_destroy.
98
   */
99
100
  struct recycle_data_t
101
  {
102
    char *buf;
103
    unsigned capacity;
104
  };
105
106
  static inline void recycle_data_destroy (void *user_data)
107
0
  {
108
0
    auto *bd = (recycle_data_t *) user_data;
109
0
    hb_free (bd->buf);
110
0
    hb_free (bd);
111
0
  }
112
113
  /* Acquire a buffer of at least @needed bytes.  If @recycled is
114
   * one of our blobs, reuse its buffer (or realloc it).
115
   * *@out_capacity receives the actual capacity (>= @needed).
116
   * *@out_replaced_buf is set to the recycled buf when realloc
117
   * fails and a fresh buffer was allocated instead -- the caller
118
   * must hb_free() that buf after recycle_finalize() runs.  Returns
119
   * nullptr on allocation failure. */
120
  static inline char *
121
  recycle_acquire (hb_blob_t *recycled,
122
       unsigned   needed,
123
       unsigned  *out_capacity,
124
       char     **out_replaced_buf)
125
0
  {
126
0
    *out_replaced_buf = nullptr;
127
0
128
0
    if (recycled && recycled->destroy == recycle_data_destroy)
129
0
    {
130
0
      auto *bd = (recycle_data_t *) recycled->user_data;
131
0
      if (bd->capacity >= needed)
132
0
      {
133
0
  *out_capacity = bd->capacity;
134
0
  return bd->buf;
135
0
      }
136
0
      /* Grow with a 1.5x ramp to amortize repeated growth. */
137
0
      unsigned alloc_bytes = needed;
138
0
      if (unlikely (hb_unsigned_add_overflows (needed, needed / 2,
139
0
                 &alloc_bytes)))
140
0
  alloc_bytes = needed;
141
0
      char *new_buf = (char *) hb_realloc (bd->buf, alloc_bytes);
142
0
      if (new_buf)
143
0
      {
144
0
  bd->buf = new_buf;
145
0
  bd->capacity = alloc_bytes;
146
0
  *out_capacity = alloc_bytes;
147
0
  return new_buf;
148
0
      }
149
0
      /* Realloc failed.  Fall through to a fresh hb_malloc and stash
150
0
       * the old buf for the caller to free after recycle_finalize. */
151
0
      *out_replaced_buf = bd->buf;
152
0
    }
153
0
154
0
    char *buf = (char *) hb_malloc (needed);
155
0
    if (unlikely (!buf))
156
0
      return nullptr;
157
0
    *out_capacity = needed;
158
0
    return buf;
159
0
  }
160
161
  /* Wrap @buf (of @capacity, with @length used) into an hb_blob_t.
162
   * If @recycled is one of our blobs, update and return it (cheap);
163
   * otherwise create a new blob.  Pass @replaced_recycled_buf from
164
   * recycle_acquire(). */
165
  static inline hb_blob_t *
166
  recycle_finalize (char      *buf,
167
        unsigned   capacity,
168
        unsigned   length,
169
        hb_blob_t *recycled,
170
        char      *replaced_recycled_buf)
171
0
  {
172
0
    if (recycled && recycled->destroy == recycle_data_destroy)
173
0
    {
174
0
      auto *bd = (recycle_data_t *) recycled->user_data;
175
0
      if (replaced_recycled_buf && replaced_recycled_buf != buf)
176
0
  hb_free (replaced_recycled_buf);
177
0
      bd->buf = buf;
178
0
      bd->capacity = capacity;
179
0
      recycled->data = (const char *) buf;
180
0
      recycled->length = length;
181
0
      return recycled;
182
0
    }
183
0
184
0
    /* No recycled blob to update -- create a fresh one with our
185
0
     * destroy closure so the next recycle round can reuse it. */
186
0
    recycle_data_t *bd = (recycle_data_t *) hb_malloc (sizeof (*bd));
187
0
    if (unlikely (!bd))
188
0
    {
189
0
      hb_free (buf);
190
0
      return nullptr;
191
0
    }
192
0
    bd->buf = buf;
193
0
    bd->capacity = capacity;
194
0
195
0
    return hb_blob_create ((const char *) buf, length,
196
0
         HB_MEMORY_MODE_WRITABLE,
197
0
         bd, recycle_data_destroy);
198
0
  }
199
200
  /* Discard @buf returned by recycle_acquire without committing to
201
   * a blob.  Frees @buf if it was a fresh allocation; leaves any
202
   * recycled buffer untouched. */
203
  static inline void
204
  recycle_abort (char *buf, hb_blob_t *recycled)
205
0
  {
206
0
    if (!buf) return;
207
0
    if (recycled && recycled->destroy == recycle_data_destroy)
208
0
    {
209
0
      auto *bd = (recycle_data_t *) recycled->user_data;
210
0
      if (buf == bd->buf) return;  /* owned by the recycled blob */
211
0
    }
212
0
    hb_free (buf);
213
0
  }
214
215
  /* Stash @blob in @slot as the recycled output for the next
216
   * encode.  Destroys any previously stashed blob.  Safe to call
217
   * with @blob = nullptr or the empty-singleton blob (treated as
218
   * "drop"). */
219
  static inline void
220
  recycle_stash (hb_blob_t **slot, hb_blob_t *blob)
221
0
  {
222
0
    hb_blob_destroy (*slot);
223
0
    *slot = nullptr;
224
0
    if (!blob || blob == hb_blob_get_empty ())
225
0
      return;
226
0
    *slot = blob;
227
0
  }
228
};
229
230
231
/*
232
 * hb_blob_ptr_t
233
 */
234
235
template <typename P>
236
struct hb_blob_ptr_t
237
{
238
  typedef hb_remove_pointer<P> T;
239
240
13.0k
  hb_blob_ptr_t (hb_blob_t *b_ = nullptr) : b (b_) {}
Unexecuted instantiation: hb_blob_ptr_t<OT::cmap>::hb_blob_ptr_t(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::hmtxvmtx<OT::hmtx, OT::hhea, OT::HVAR> >::hb_blob_ptr_t(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::HVAR>::hb_blob_ptr_t(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::gvar_GVAR<OT::NumType<true, unsigned short, 2u>, 1735811442u> >::hb_blob_ptr_t(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::loca>::hb_blob_ptr_t(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::glyf>::hb_blob_ptr_t(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::hmtxvmtx<OT::vmtx, OT::vhea, OT::VVAR> >::hb_blob_ptr_t(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::VVAR>::hb_blob_ptr_t(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::VARC>::hb_blob_ptr_t(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::COLR>::hb_blob_ptr_t(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::SVG>::hb_blob_ptr_t(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::CBLC>::hb_blob_ptr_t(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::CBDT>::hb_blob_ptr_t(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::sbix>::hb_blob_ptr_t(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::post>::hb_blob_ptr_t(hb_blob_t*)
hb_blob_ptr_t<OT::GDEF>::hb_blob_ptr_t(hb_blob_t*)
Line
Count
Source
240
1.86k
  hb_blob_ptr_t (hb_blob_t *b_ = nullptr) : b (b_) {}
hb_blob_ptr_t<OT::Layout::GSUB>::hb_blob_ptr_t(hb_blob_t*)
Line
Count
Source
240
1.86k
  hb_blob_ptr_t (hb_blob_t *b_ = nullptr) : b (b_) {}
hb_blob_ptr_t<AAT::morx>::hb_blob_ptr_t(hb_blob_t*)
Line
Count
Source
240
1.86k
  hb_blob_ptr_t (hb_blob_t *b_ = nullptr) : b (b_) {}
hb_blob_ptr_t<AAT::mort>::hb_blob_ptr_t(hb_blob_t*)
Line
Count
Source
240
1.86k
  hb_blob_ptr_t (hb_blob_t *b_ = nullptr) : b (b_) {}
hb_blob_ptr_t<AAT::kerx>::hb_blob_ptr_t(hb_blob_t*)
Line
Count
Source
240
1.86k
  hb_blob_ptr_t (hb_blob_t *b_ = nullptr) : b (b_) {}
hb_blob_ptr_t<OT::Layout::GPOS>::hb_blob_ptr_t(hb_blob_t*)
Line
Count
Source
240
1.86k
  hb_blob_ptr_t (hb_blob_t *b_ = nullptr) : b (b_) {}
hb_blob_ptr_t<OT::kern>::hb_blob_ptr_t(hb_blob_t*)
Line
Count
Source
240
1.86k
  hb_blob_ptr_t (hb_blob_t *b_ = nullptr) : b (b_) {}
241
13.0k
  hb_blob_t * operator = (hb_blob_t *b_) { return b = b_; }
Unexecuted instantiation: hb_blob_ptr_t<OT::cmap>::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::hmtxvmtx<OT::hmtx, OT::hhea, OT::HVAR> >::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::HVAR>::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::hmtxvmtx<OT::vmtx, OT::vhea, OT::VVAR> >::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::VVAR>::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::gvar_GVAR<OT::NumType<true, unsigned short, 2u>, 1735811442u> >::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::gvar_GVAR<OT::NumType<true, unsigned int, 3u>, 1196835154u> >::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::loca>::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::glyf>::operator=(hb_blob_t*)
hb_blob_ptr_t<OT::GDEF>::operator=(hb_blob_t*)
Line
Count
Source
241
1.86k
  hb_blob_t * operator = (hb_blob_t *b_) { return b = b_; }
hb_blob_ptr_t<OT::Layout::GPOS>::operator=(hb_blob_t*)
Line
Count
Source
241
1.86k
  hb_blob_t * operator = (hb_blob_t *b_) { return b = b_; }
hb_blob_ptr_t<AAT::kerx>::operator=(hb_blob_t*)
Line
Count
Source
241
1.86k
  hb_blob_t * operator = (hb_blob_t *b_) { return b = b_; }
hb_blob_ptr_t<OT::kern>::operator=(hb_blob_t*)
Line
Count
Source
241
1.86k
  hb_blob_t * operator = (hb_blob_t *b_) { return b = b_; }
Unexecuted instantiation: hb_blob_ptr_t<OT::meta>::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::name>::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::post>::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::CBLC>::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::CBDT>::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::COLR>::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::sbix>::operator=(hb_blob_t*)
Unexecuted instantiation: hb_blob_ptr_t<OT::SVG>::operator=(hb_blob_t*)
hb_blob_ptr_t<OT::Layout::GSUB>::operator=(hb_blob_t*)
Line
Count
Source
241
1.86k
  hb_blob_t * operator = (hb_blob_t *b_) { return b = b_; }
Unexecuted instantiation: hb_blob_ptr_t<OT::VARC>::operator=(hb_blob_t*)
hb_blob_ptr_t<AAT::morx>::operator=(hb_blob_t*)
Line
Count
Source
241
1.86k
  hb_blob_t * operator = (hb_blob_t *b_) { return b = b_; }
hb_blob_ptr_t<AAT::mort>::operator=(hb_blob_t*)
Line
Count
Source
241
1.86k
  hb_blob_t * operator = (hb_blob_t *b_) { return b = b_; }
242
374k
  const T * operator -> () const { return get (); }
Unexecuted instantiation: hb_blob_ptr_t<OT::cmap>::operator->() const
Unexecuted instantiation: hb_blob_ptr_t<OT::gvar_GVAR<OT::NumType<true, unsigned short, 2u>, 1735811442u> >::operator->() const
Unexecuted instantiation: hb_blob_ptr_t<OT::gvar_GVAR<OT::NumType<true, unsigned int, 3u>, 1196835154u> >::operator->() const
Unexecuted instantiation: hb_blob_ptr_t<OT::hmtxvmtx<OT::hmtx, OT::hhea, OT::HVAR> >::operator->() const
Unexecuted instantiation: hb_blob_ptr_t<OT::hmtxvmtx<OT::vmtx, OT::vhea, OT::VVAR> >::operator->() const
Unexecuted instantiation: hb_blob_ptr_t<OT::loca>::operator->() const
hb_blob_ptr_t<OT::GDEF>::operator->() const
Line
Count
Source
242
341k
  const T * operator -> () const { return get (); }
hb_blob_ptr_t<OT::Layout::GPOS>::operator->() const
Line
Count
Source
242
6.05k
  const T * operator -> () const { return get (); }
hb_blob_ptr_t<AAT::kerx>::operator->() const
Line
Count
Source
242
4.12k
  const T * operator -> () const { return get (); }
hb_blob_ptr_t<OT::kern>::operator->() const
Line
Count
Source
242
4.79k
  const T * operator -> () const { return get (); }
Unexecuted instantiation: hb_blob_ptr_t<OT::meta>::operator->() const
Unexecuted instantiation: hb_blob_ptr_t<OT::name>::operator->() const
Unexecuted instantiation: hb_blob_ptr_t<OT::post>::operator->() const
Unexecuted instantiation: hb_blob_ptr_t<OT::CBLC>::operator->() const
Unexecuted instantiation: hb_blob_ptr_t<OT::CBDT>::operator->() const
Unexecuted instantiation: hb_blob_ptr_t<OT::COLR>::operator->() const
Unexecuted instantiation: hb_blob_ptr_t<OT::sbix>::operator->() const
Unexecuted instantiation: hb_blob_ptr_t<OT::SVG>::operator->() const
hb_blob_ptr_t<OT::Layout::GSUB>::operator->() const
Line
Count
Source
242
6.06k
  const T * operator -> () const { return get (); }
Unexecuted instantiation: hb_blob_ptr_t<OT::VARC>::operator->() const
hb_blob_ptr_t<AAT::morx>::operator->() const
Line
Count
Source
242
5.98k
  const T * operator -> () const { return get (); }
hb_blob_ptr_t<AAT::mort>::operator->() const
Line
Count
Source
242
5.98k
  const T * operator -> () const { return get (); }
Unexecuted instantiation: hb_blob_ptr_t<OT::HVAR>::operator->() const
Unexecuted instantiation: hb_blob_ptr_t<OT::VVAR>::operator->() const
243
1.96M
  const T & operator * () const  { return *get (); }
hb_blob_ptr_t<OT::GDEF>::operator*() const
Line
Count
Source
243
1.29M
  const T & operator * () const  { return *get (); }
Unexecuted instantiation: hb_blob_ptr_t<OT::HVAR>::operator*() const
Unexecuted instantiation: hb_blob_ptr_t<OT::VVAR>::operator*() const
Unexecuted instantiation: hb_blob_ptr_t<OT::VARC>::operator*() const
Unexecuted instantiation: hb_blob_ptr_t<AAT::morx>::operator*() const
Unexecuted instantiation: hb_blob_ptr_t<AAT::mort>::operator*() const
hb_blob_ptr_t<OT::Layout::GSUB>::operator*() const
Line
Count
Source
243
333k
  const T & operator * () const  { return *get (); }
hb_blob_ptr_t<OT::Layout::GPOS>::operator*() const
Line
Count
Source
243
333k
  const T & operator * () const  { return *get (); }
244
0
  template <typename C> operator const C * () const { return get (); }
Unexecuted instantiation: hb_blob_ptr_t<OT::gvar_GVAR<OT::NumType<true, unsigned short, 2u>, 1735811442u> >::operator void const*<void>() const
Unexecuted instantiation: hb_blob_ptr_t<OT::name>::operator void const*<void>() const
Unexecuted instantiation: hb_blob_ptr_t<OT::post>::operator void const*<void>() const
Unexecuted instantiation: hb_blob_ptr_t<OT::CBLC>::operator void const*<void>() const
Unexecuted instantiation: hb_blob_ptr_t<OT::CBDT>::operator void const*<void>() const
245
0
  operator const char * () const { return (const char *) get (); }
246
2.33M
  const T * get () const { return b->as<T> (); }
Unexecuted instantiation: hb_blob_ptr_t<OT::cmap>::get() const
Unexecuted instantiation: hb_blob_ptr_t<OT::gvar_GVAR<OT::NumType<true, unsigned short, 2u>, 1735811442u> >::get() const
Unexecuted instantiation: hb_blob_ptr_t<OT::gvar_GVAR<OT::NumType<true, unsigned int, 3u>, 1196835154u> >::get() const
Unexecuted instantiation: hb_blob_ptr_t<OT::hmtxvmtx<OT::hmtx, OT::hhea, OT::HVAR> >::get() const
Unexecuted instantiation: hb_blob_ptr_t<OT::hmtxvmtx<OT::vmtx, OT::vhea, OT::VVAR> >::get() const
Unexecuted instantiation: hb_blob_ptr_t<OT::loca>::get() const
Unexecuted instantiation: hb_blob_ptr_t<OT::glyf>::get() const
hb_blob_ptr_t<OT::GDEF>::get() const
Line
Count
Source
246
1.63M
  const T * get () const { return b->as<T> (); }
hb_blob_ptr_t<OT::Layout::GPOS>::get() const
Line
Count
Source
246
339k
  const T * get () const { return b->as<T> (); }
hb_blob_ptr_t<AAT::kerx>::get() const
Line
Count
Source
246
4.12k
  const T * get () const { return b->as<T> (); }
hb_blob_ptr_t<OT::kern>::get() const
Line
Count
Source
246
4.79k
  const T * get () const { return b->as<T> (); }
Unexecuted instantiation: hb_blob_ptr_t<OT::meta>::get() const
Unexecuted instantiation: hb_blob_ptr_t<OT::name>::get() const
Unexecuted instantiation: hb_blob_ptr_t<OT::post>::get() const
Unexecuted instantiation: hb_blob_ptr_t<OT::CBLC>::get() const
Unexecuted instantiation: hb_blob_ptr_t<OT::CBDT>::get() const
Unexecuted instantiation: hb_blob_ptr_t<OT::COLR>::get() const
Unexecuted instantiation: hb_blob_ptr_t<OT::sbix>::get() const
Unexecuted instantiation: hb_blob_ptr_t<OT::SVG>::get() const
hb_blob_ptr_t<OT::Layout::GSUB>::get() const
Line
Count
Source
246
339k
  const T * get () const { return b->as<T> (); }
Unexecuted instantiation: hb_blob_ptr_t<OT::VARC>::get() const
hb_blob_ptr_t<AAT::morx>::get() const
Line
Count
Source
246
5.98k
  const T * get () const { return b->as<T> (); }
hb_blob_ptr_t<AAT::mort>::get() const
Line
Count
Source
246
5.98k
  const T * get () const { return b->as<T> (); }
Unexecuted instantiation: hb_blob_ptr_t<OT::HVAR>::get() const
Unexecuted instantiation: hb_blob_ptr_t<OT::VVAR>::get() const
247
667k
  hb_blob_t * get_blob () const { return b.get_raw (); }
Unexecuted instantiation: hb_blob_ptr_t<OT::gvar_GVAR<OT::NumType<true, unsigned short, 2u>, 1735811442u> >::get_blob() const
hb_blob_ptr_t<OT::GDEF>::get_blob() const
Line
Count
Source
247
15.5k
  hb_blob_t * get_blob () const { return b.get_raw (); }
hb_blob_ptr_t<OT::Layout::GPOS>::get_blob() const
Line
Count
Source
247
323k
  hb_blob_t * get_blob () const { return b.get_raw (); }
hb_blob_ptr_t<OT::kern>::get_blob() const
Line
Count
Source
247
632
  hb_blob_t * get_blob () const { return b.get_raw (); }
Unexecuted instantiation: hb_blob_ptr_t<OT::meta>::get_blob() const
Unexecuted instantiation: hb_blob_ptr_t<OT::CBDT>::get_blob() const
Unexecuted instantiation: hb_blob_ptr_t<OT::COLR>::get_blob() const
Unexecuted instantiation: hb_blob_ptr_t<OT::sbix>::get_blob() const
Unexecuted instantiation: hb_blob_ptr_t<OT::SVG>::get_blob() const
hb_blob_ptr_t<OT::Layout::GSUB>::get_blob() const
Line
Count
Source
247
323k
  hb_blob_t * get_blob () const { return b.get_raw (); }
hb_blob_ptr_t<AAT::morx>::get_blob() const
Line
Count
Source
247
1.86k
  hb_blob_t * get_blob () const { return b.get_raw (); }
hb_blob_ptr_t<AAT::mort>::get_blob() const
Line
Count
Source
247
1.86k
  hb_blob_t * get_blob () const { return b.get_raw (); }
Unexecuted instantiation: hb_blob_ptr_t<AAT::kerx>::get_blob() const
248
7.45k
  unsigned int get_length () const { return b.get ()->length; }
Unexecuted instantiation: hb_blob_ptr_t<OT::cmap>::get_length() const
Unexecuted instantiation: hb_blob_ptr_t<OT::hmtxvmtx<OT::hmtx, OT::hhea, OT::HVAR> >::get_length() const
Unexecuted instantiation: hb_blob_ptr_t<OT::hmtxvmtx<OT::vmtx, OT::vhea, OT::VVAR> >::get_length() const
Unexecuted instantiation: hb_blob_ptr_t<OT::loca>::get_length() const
Unexecuted instantiation: hb_blob_ptr_t<OT::glyf>::get_length() const
Unexecuted instantiation: hb_blob_ptr_t<OT::name>::get_length() const
Unexecuted instantiation: hb_blob_ptr_t<OT::post>::get_length() const
Unexecuted instantiation: hb_blob_ptr_t<OT::CBDT>::get_length() const
hb_blob_ptr_t<OT::Layout::GSUB>::get_length() const
Line
Count
Source
248
3.72k
  unsigned int get_length () const { return b.get ()->length; }
hb_blob_ptr_t<OT::GDEF>::get_length() const
Line
Count
Source
248
1.86k
  unsigned int get_length () const { return b.get ()->length; }
hb_blob_ptr_t<OT::Layout::GPOS>::get_length() const
Line
Count
Source
248
1.86k
  unsigned int get_length () const { return b.get ()->length; }
249
13.0k
  void destroy () { hb_blob_destroy (b.get_raw ()); b = nullptr; }
Unexecuted instantiation: hb_blob_ptr_t<OT::cmap>::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::hmtxvmtx<OT::hmtx, OT::hhea, OT::HVAR> >::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::HVAR>::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::post>::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::name>::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::meta>::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::hmtxvmtx<OT::vmtx, OT::vhea, OT::VVAR> >::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::VVAR>::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::glyf>::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::gvar_GVAR<OT::NumType<true, unsigned short, 2u>, 1735811442u> >::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::VARC>::destroy()
hb_blob_ptr_t<OT::kern>::destroy()
Line
Count
Source
249
1.86k
  void destroy () { hb_blob_destroy (b.get_raw ()); b = nullptr; }
hb_blob_ptr_t<OT::GDEF>::destroy()
Line
Count
Source
249
1.86k
  void destroy () { hb_blob_destroy (b.get_raw ()); b = nullptr; }
hb_blob_ptr_t<OT::Layout::GSUB>::destroy()
Line
Count
Source
249
1.86k
  void destroy () { hb_blob_destroy (b.get_raw ()); b = nullptr; }
hb_blob_ptr_t<OT::Layout::GPOS>::destroy()
Line
Count
Source
249
1.86k
  void destroy () { hb_blob_destroy (b.get_raw ()); b = nullptr; }
hb_blob_ptr_t<AAT::morx>::destroy()
Line
Count
Source
249
1.86k
  void destroy () { hb_blob_destroy (b.get_raw ()); b = nullptr; }
hb_blob_ptr_t<AAT::mort>::destroy()
Line
Count
Source
249
1.86k
  void destroy () { hb_blob_destroy (b.get_raw ()); b = nullptr; }
hb_blob_ptr_t<AAT::kerx>::destroy()
Line
Count
Source
249
1.86k
  void destroy () { hb_blob_destroy (b.get_raw ()); b = nullptr; }
Unexecuted instantiation: hb_blob_ptr_t<OT::COLR>::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::CBLC>::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::CBDT>::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::sbix>::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::SVG>::destroy()
Unexecuted instantiation: hb_blob_ptr_t<OT::gvar_GVAR<OT::NumType<true, unsigned int, 3u>, 1196835154u> >::destroy()
250
251
  private:
252
  hb_nonnull_ptr_t<hb_blob_t> b;
253
};
254
255
256
#endif /* HB_BLOB_HH */