mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-03 08:00:42 +02:00
Rename cairo_format_width to cairo_format_bits_per_pixel and correct its logic
This commit is contained in:
parent
538ace5b51
commit
b151cb0709
3 changed files with 7 additions and 6 deletions
|
|
@ -615,14 +615,14 @@ _cairo_content_from_format (cairo_format_t format)
|
|||
return CAIRO_CONTENT_COLOR_ALPHA;
|
||||
}
|
||||
|
||||
cairo_private cairo_format_t
|
||||
_cairo_format_width (cairo_format_t format)
|
||||
int
|
||||
_cairo_format_bits_per_pixel (cairo_format_t format)
|
||||
{
|
||||
switch (format) {
|
||||
case CAIRO_FORMAT_ARGB32:
|
||||
return 32;
|
||||
case CAIRO_FORMAT_RGB24:
|
||||
return 24;
|
||||
return 32;
|
||||
case CAIRO_FORMAT_A8:
|
||||
return 8;
|
||||
case CAIRO_FORMAT_A1:
|
||||
|
|
|
|||
|
|
@ -1270,7 +1270,8 @@ _cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font,
|
|||
/* If we have glyphs of different formats, we "upgrade" the mask
|
||||
* to the wider of the formats. */
|
||||
if (glyph_surface->format != mask_format &&
|
||||
_cairo_format_width (mask_format) < _cairo_format_width (glyph_surface->format) )
|
||||
_cairo_format_bits_per_pixel (mask_format) <
|
||||
_cairo_format_bits_per_pixel (glyph_surface->format) )
|
||||
{
|
||||
cairo_surface_t *new_mask;
|
||||
cairo_surface_pattern_t mask_pattern;
|
||||
|
|
|
|||
|
|
@ -1795,8 +1795,8 @@ _cairo_surface_has_device_transform (cairo_surface_t *surface);
|
|||
CAIRO_CONTENT_COLOR_ALPHA))\
|
||||
== 0))
|
||||
|
||||
cairo_private cairo_format_t
|
||||
_cairo_format_width (cairo_format_t format);
|
||||
cairo_private int
|
||||
_cairo_format_bits_per_pixel (cairo_format_t format);
|
||||
|
||||
cairo_private cairo_format_t
|
||||
_cairo_format_from_content (cairo_content_t content);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue