mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-15 16:08:05 +02:00
GDI: Rename _get_global_font_dc to _get_thread_font_dc
The HDC is thread-local since a long time, make this clear by renaming the function.
This commit is contained in:
parent
1f5230dde0
commit
7fa1a901ea
1 changed files with 9 additions and 9 deletions
|
|
@ -141,7 +141,7 @@ _cairo_win32_scaled_font_init_glyph_path (cairo_win32_scaled_font_t *scaled_font
|
|||
#define NEARLY_ZERO(d) (fabs(d) < (1. / 65536.))
|
||||
|
||||
static HDC
|
||||
_get_global_font_dc (void)
|
||||
_get_thread_font_dc (void)
|
||||
{
|
||||
cairo_win32_thread_data_t *data = cairo_win32_thread_data_get ();
|
||||
|
||||
|
|
@ -314,7 +314,7 @@ _win32_scaled_font_create (LOGFONTW *logfont,
|
|||
cairo_matrix_t scale;
|
||||
cairo_status_t status;
|
||||
|
||||
hdc = _get_global_font_dc ();
|
||||
hdc = _get_thread_font_dc ();
|
||||
if (hdc == NULL)
|
||||
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
|
||||
|
|
@ -654,7 +654,7 @@ _cairo_win32_scaled_font_ucs4_to_index (void *abstract_font,
|
|||
HDC hdc = NULL;
|
||||
cairo_status_t status;
|
||||
|
||||
hdc = _get_global_font_dc ();
|
||||
hdc = _get_thread_font_dc ();
|
||||
assert (hdc != NULL);
|
||||
|
||||
status = cairo_win32_scaled_font_select_font (&scaled_font->base, hdc);
|
||||
|
|
@ -682,7 +682,7 @@ _cairo_win32_scaled_font_set_metrics (cairo_win32_scaled_font_t *scaled_font)
|
|||
TEXTMETRIC metrics = {0};
|
||||
HDC hdc;
|
||||
|
||||
hdc = _get_global_font_dc ();
|
||||
hdc = _get_thread_font_dc ();
|
||||
assert (hdc != NULL);
|
||||
|
||||
if (scaled_font->preserve_axes || scaled_font->base.options.hint_metrics == CAIRO_HINT_METRICS_OFF) {
|
||||
|
|
@ -764,7 +764,7 @@ _cairo_win32_scaled_font_init_glyph_metrics (cairo_win32_scaled_font_t *scaled_f
|
|||
cairo_text_extents_t extents;
|
||||
HDC hdc;
|
||||
|
||||
hdc = _get_global_font_dc ();
|
||||
hdc = _get_thread_font_dc ();
|
||||
assert (hdc != NULL);
|
||||
|
||||
if (scaled_font->is_bitmap) {
|
||||
|
|
@ -899,7 +899,7 @@ _cairo_win32_scaled_font_glyph_bbox (void *abstract_font,
|
|||
cairo_status_t status;
|
||||
int i;
|
||||
|
||||
hdc = _get_global_font_dc ();
|
||||
hdc = _get_thread_font_dc ();
|
||||
assert (hdc != NULL);
|
||||
|
||||
status = cairo_win32_scaled_font_select_font (&scaled_font->base, hdc);
|
||||
|
|
@ -1143,7 +1143,7 @@ _cairo_win32_scaled_font_load_truetype_table (void *abstract_font,
|
|||
cairo_status_t status;
|
||||
DWORD ret;
|
||||
|
||||
hdc = _get_global_font_dc ();
|
||||
hdc = _get_thread_font_dc ();
|
||||
assert (hdc != NULL);
|
||||
|
||||
tag = (tag&0x000000ffu)<<24 | (tag&0x0000ff00)<<8 | (tag&0x00ff0000)>>8 | (tag&0xff000000)>>24;
|
||||
|
|
@ -1176,7 +1176,7 @@ _cairo_win32_scaled_font_index_to_ucs4 (void *abstract_font,
|
|||
unsigned int i, j, num_glyphs;
|
||||
cairo_status_t status;
|
||||
|
||||
hdc = _get_global_font_dc ();
|
||||
hdc = _get_thread_font_dc ();
|
||||
assert (hdc != NULL);
|
||||
|
||||
status = cairo_win32_scaled_font_select_font (&scaled_font->base, hdc);
|
||||
|
|
@ -1471,7 +1471,7 @@ _cairo_win32_scaled_font_init_glyph_path (cairo_win32_scaled_font_t *scaled_font
|
|||
if (scaled_font->is_bitmap)
|
||||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
|
||||
hdc = _get_global_font_dc ();
|
||||
hdc = _get_thread_font_dc ();
|
||||
assert (hdc != NULL);
|
||||
|
||||
path = _cairo_path_fixed_create ();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue