mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 01:48:07 +02:00
[cairo-font-options] Eliminate internal use of cairo_font_options_create()
Within the library, we know the precise size of the struct and so can allocate temporary font options on the stack - eliminating the need to export an internal alias of cairo_font_options_(create|destory).
This commit is contained in:
parent
b72fe9bb5f
commit
e4fc5279cc
3 changed files with 3 additions and 10 deletions
|
|
@ -95,7 +95,6 @@ cairo_font_options_create (void)
|
|||
|
||||
return options;
|
||||
}
|
||||
slim_hidden_def (cairo_font_options_create);
|
||||
|
||||
/**
|
||||
* cairo_font_options_copy:
|
||||
|
|
@ -144,7 +143,6 @@ cairo_font_options_destroy (cairo_font_options_t *options)
|
|||
|
||||
free (options);
|
||||
}
|
||||
slim_hidden_def (cairo_font_options_destroy);
|
||||
|
||||
/**
|
||||
* cairo_font_options_status:
|
||||
|
|
|
|||
|
|
@ -2120,19 +2120,16 @@ _cairo_surface_show_glyphs (cairo_surface_t *surface,
|
|||
if (_cairo_surface_has_device_transform (surface) &&
|
||||
! _cairo_matrix_is_integer_translation (&surface->device_transform, NULL, NULL))
|
||||
{
|
||||
cairo_font_options_t *font_options;
|
||||
cairo_font_options_t font_options;
|
||||
cairo_matrix_t dev_ctm;
|
||||
|
||||
font_options = cairo_font_options_create ();
|
||||
|
||||
cairo_scaled_font_get_ctm (scaled_font, &dev_ctm);
|
||||
cairo_matrix_multiply (&dev_ctm, &dev_ctm, &surface->device_transform);
|
||||
cairo_scaled_font_get_font_options (scaled_font, font_options);
|
||||
cairo_scaled_font_get_font_options (scaled_font, &font_options);
|
||||
dev_scaled_font = cairo_scaled_font_create (cairo_scaled_font_get_font_face (scaled_font),
|
||||
&font_matrix,
|
||||
&dev_ctm,
|
||||
font_options);
|
||||
cairo_font_options_destroy (font_options);
|
||||
&font_options);
|
||||
}
|
||||
status = cairo_scaled_font_status (dev_scaled_font);
|
||||
if (status) {
|
||||
|
|
|
|||
|
|
@ -2258,8 +2258,6 @@ slim_hidden_proto (cairo_destroy);
|
|||
slim_hidden_proto (cairo_fill_preserve);
|
||||
slim_hidden_proto (cairo_font_face_destroy);
|
||||
slim_hidden_proto_no_warn (cairo_font_face_reference);
|
||||
slim_hidden_proto (cairo_font_options_create);
|
||||
slim_hidden_proto (cairo_font_options_destroy);
|
||||
slim_hidden_proto (cairo_font_options_equal);
|
||||
slim_hidden_proto (cairo_font_options_hash);
|
||||
slim_hidden_proto (cairo_font_options_merge);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue