From 72f81a33acca9e1d301a07e0d70e0f17b751322f Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Wed, 30 May 2012 09:21:38 +0800 Subject: [PATCH] VPP: Don't render the target surface with background if alpha value is 0 Signed-off-by: Xiang, Haihao --- src/i965_post_processing.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c index eb20828..f084bb3 100755 --- a/src/i965_post_processing.c +++ b/src/i965_post_processing.c @@ -3687,7 +3687,7 @@ i965_vpp_clear_surface(VADriverContextP ctx, unsigned int blt_cmd, br13; unsigned int tiling = 0, swizzle = 0; int pitch; - unsigned char y, u, v, a; + unsigned char y, u, v, a = 0; /* Currently only support NV12 surface */ if (!obj_surface || obj_surface->fourcc != VA_FOURCC('N', 'V', '1', '2')) @@ -3695,6 +3695,9 @@ i965_vpp_clear_surface(VADriverContextP ctx, rgb_to_yuv(color, &y, &u, &v, &a); + if (a == 0) + return; + dri_bo_get_tiling(obj_surface->bo, &tiling, &swizzle); blt_cmd = XY_COLOR_BLT_CMD; pitch = obj_surface->width; -- 2.11.0