mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-06-05 04:28:16 +02:00
Remove _cairo_image_surface_is_alpha_only in favor of just looking at content value.
This commit is contained in:
parent
82496a6f7c
commit
0ba040d7f6
1 changed files with 1 additions and 15 deletions
|
|
@ -806,20 +806,6 @@ _cairo_image_surface_fill_rectangles (void *abstract_surface,
|
|||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static cairo_bool_t
|
||||
_cairo_image_surface_is_alpha_only (cairo_image_surface_t *surface)
|
||||
{
|
||||
int bpp, alpha, red, green, blue;
|
||||
|
||||
if (surface->format != (cairo_format_t) -1)
|
||||
return surface->format == CAIRO_FORMAT_A1 || surface->format == CAIRO_FORMAT_A8;
|
||||
|
||||
pixman_format_get_masks (pixman_image_get_format (surface->pixman_image),
|
||||
&bpp, &alpha, &red, &green, &blue);
|
||||
|
||||
return red == 0 && blue == 0 && green == 0;
|
||||
}
|
||||
|
||||
static cairo_int_status_t
|
||||
_cairo_image_surface_composite_trapezoids (cairo_operator_t op,
|
||||
cairo_pattern_t *pattern,
|
||||
|
|
@ -859,7 +845,7 @@ _cairo_image_surface_composite_trapezoids (cairo_operator_t op,
|
|||
*/
|
||||
if (op == CAIRO_OPERATOR_ADD &&
|
||||
_cairo_pattern_is_opaque_solid (pattern) &&
|
||||
_cairo_image_surface_is_alpha_only (dst) &&
|
||||
dst->base.content == CAIRO_CONTENT_ALPHA &&
|
||||
!dst->has_clip &&
|
||||
antialias != CAIRO_ANTIALIAS_NONE)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue