diff options
author | Grigori Goronzy <greg@blackbox> | 2011-07-13 21:52:23 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2011-07-13 21:52:23 +0200 |
commit | 867739ba1b40a035471d2c5e6208d96420cfed95 (patch) | |
tree | 638562878f16218189f548bb40b87a7d897de254 /libass/ass_shaper.h | |
parent | 84fff91fc561efee329a16705e97ca9505ea93ba (diff) | |
download | libass-867739ba1b40a035471d2c5e6208d96420cfed95.tar.bz2 libass-867739ba1b40a035471d2c5e6208d96420cfed95.tar.xz |
Introduce ASS_Shaper object
Encapsulate all data related to shaping into this new object and migrate
all shaping-related code to it. The object is long-living; arrays are
allocated only once and then grown as needed.
Diffstat (limited to 'libass/ass_shaper.h')
-rw-r--r-- | libass/ass_shaper.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/libass/ass_shaper.h b/libass/ass_shaper.h index d96c202..e067d3f 100644 --- a/libass/ass_shaper.h +++ b/libass/ass_shaper.h @@ -16,15 +16,21 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef ASS_SHAPER_H -#define ASS_SHAPER_H +#ifndef LIBASS_SHAPER_H +#define LIBASS_SHAPER_H + +#include "config.h" #include <fribidi/fribidi.h> +#include "ass_render.h" void ass_shaper_info(ASS_Library *lib); -void ass_shaper_shape(TextInfo *text_info, FriBidiCharType *ctypes, - FriBidiLevel *emblevels); -void ass_shaper_cleanup(TextInfo *text_info); -void ass_shaper_reorder(TextInfo *text_info, FriBidiCharType *ctypes, - FriBidiLevel *emblevels, FriBidiStrIndex *cmap); +ASS_Shaper *ass_shaper_new(size_t prealloc); +void ass_shaper_free(ASS_Shaper *shaper); +void ass_shaper_find_runs(ASS_Shaper *shaper, ASS_Renderer *render_priv, + GlyphInfo *glyphs, size_t len); +void ass_shaper_shape(ASS_Shaper *shaper, TextInfo *text_info); +void ass_shaper_cleanup(ASS_Shaper *shaper, TextInfo *text_info); +FriBidiStrIndex *ass_shaper_reorder(ASS_Shaper *shaper, TextInfo *text_info); + #endif |