xcb: Remove a wrong optimization

Clear surfaces with an alpha channel are already replaced with a
transparent color in gstate, so this code was never hit.

Clear surfaces without an alpha channel, can be replaced with solid
black only if the surface pattern has an extend other than
CAIRO_EXTEND_NONE.

Fixes the clear-source test for xcb.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Andrea Canciani <ranma42@gmail.com>
This commit is contained in:
Uli Schlachter 2010-11-29 19:11:26 +01:00 committed by Andrea Canciani
parent e6c3efdd65
commit cf0a4ed862

View file

@ -1156,13 +1156,6 @@ _cairo_xcb_surface_picture (cairo_xcb_surface_t *target,
cairo_filter_t filter;
cairo_status_t status;
if (source->is_clear) {
if (source->content & CAIRO_CONTENT_ALPHA)
return _cairo_xcb_transparent_picture (target);
else
return _cairo_xcb_black_picture (target);
}
{
cairo_xcb_surface_t *snapshot;