diff --git a/src/hb-gpu-draw.cc b/src/hb-gpu-draw.cc index 0ba26ea1f..1e0808092 100644 --- a/src/hb-gpu-draw.cc +++ b/src/hb-gpu-draw.cc @@ -33,7 +33,6 @@ #include - /* ---- Accumulator ---- */ static void diff --git a/src/hb-gpu.cc b/src/hb-gpu.cc new file mode 100644 index 000000000..46983bf37 --- /dev/null +++ b/src/hb-gpu.cc @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2026 Behdad Esfahbod + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Author(s): Behdad Esfahbod + */ + +#include "hb.hh" + +#include "hb-gpu.h" + +/** + * SECTION:hb-gpu + * @title: hb-gpu + * @short_description: GPU shape encoding + * @include: hb-gpu.h + * + * Functions for encoding glyph outlines into compact blobs + * for GPU rendering. + **/ diff --git a/src/hb-gpu.h b/src/hb-gpu.h index 90b1d8e35..56e0a44dd 100644 --- a/src/hb-gpu.h +++ b/src/hb-gpu.h @@ -74,14 +74,14 @@ HB_EXTERN void hb_gpu_draw_destroy (hb_gpu_draw_t *draw); HB_EXTERN hb_bool_t -hb_gpu_draw_set_user_data (hb_gpu_draw_t *glyph, +hb_gpu_draw_set_user_data (hb_gpu_draw_t *draw, hb_user_data_key_t *key, void *data, hb_destroy_func_t destroy, hb_bool_t replace); HB_EXTERN void * -hb_gpu_draw_get_user_data (hb_gpu_draw_t *glyph, +hb_gpu_draw_get_user_data (hb_gpu_draw_t *draw, hb_user_data_key_t *key); @@ -102,7 +102,7 @@ HB_EXTERN hb_blob_t * hb_gpu_draw_encode (hb_gpu_draw_t *draw); HB_EXTERN void -hb_gpu_draw_get_extents (hb_gpu_draw_t *glyph, +hb_gpu_draw_get_extents (hb_gpu_draw_t *draw, hb_glyph_extents_t *extents); HB_EXTERN void diff --git a/src/meson.build b/src/meson.build index 5dfc9b3a3..a9079ab96 100644 --- a/src/meson.build +++ b/src/meson.build @@ -870,6 +870,7 @@ foreach p: hb_gpu_shaders endforeach hb_gpu_sources = [ + 'hb-gpu.cc', 'hb-gpu-draw.cc', 'hb-gpu-draw.hh', 'hb-gpu-cu2qu.hh',