From: Keith Packard Date: Tue, 22 Apr 2014 23:33:45 +0000 (-0700) Subject: glamor: Wire alpha to 1 for pictures without alpha bits X-Git-Tag: upstream/1.16~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=747160016ba2d0cd42ad6b174cbf927d67c01875;p=platform%2Fupstream%2Fxorg-server.git glamor: Wire alpha to 1 for pictures without alpha bits When sourcing a picture that has no alpha values, make sure any texture fetches wire the alpha value to one. This ensures that bits beyond the depth of the pixmap, or bits other than the RGB values aren't used. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt --- diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index 294a4ae..14ab738 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -870,7 +870,10 @@ glamor_composite_choose_shader(CARD8 op, goto fail; } else { - key.source = SHADER_SOURCE_TEXTURE_ALPHA; + if (PICT_FORMAT_A(source->format)) + key.source = SHADER_SOURCE_TEXTURE_ALPHA; + else + key.source = SHADER_SOURCE_TEXTURE; } if (mask) {