OSDN Git Service

VPP: Don't render the target surface with background if alpha value is 0
authorXiang, Haihao <haihao.xiang@intel.com>
Wed, 30 May 2012 01:21:38 +0000 (09:21 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Wed, 31 Oct 2012 08:46:15 +0000 (16:46 +0800)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
src/i965_post_processing.c

index eb20828..f084bb3 100755 (executable)
@@ -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;