51d83abcd2
Skia has been using the not entirely public HarfBuzz subsetting API. This API is changing for public release. In order to make the transition from old to new build flags were added, which would require build changes as HarfBuzz is updated downstream. Instead detect the existence of the old or new API and use whichever is present automatically. Change-Id: I0727f97ad7d394dfb24553076d4b383570cf0002 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437121 Reviewed-by: Garret Rieger <grieger@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
12 lines
430 B
C++
12 lines
430 B
C++
/*
|
|
* Adds a mutex implementation based on c++ mutex to harfbuzz.
|
|
*/
|
|
#include <mutex>
|
|
|
|
using hb_mutex_impl_t = std::mutex;
|
|
#define HB_MUTEX_IMPL_INIT UNUSED
|
|
#define hb_mutex_impl_init(M) HB_STMT_START { new (M) hb_mutex_impl_t; } HB_STMT_END
|
|
#define hb_mutex_impl_lock(M) (M)->lock ()
|
|
#define hb_mutex_impl_unlock(M) (M)->unlock ()
|
|
#define hb_mutex_impl_finish(M) HB_STMT_START { (M)->~hb_mutex_impl_t(); } HB_STMT_END
|