diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2012-05-30 09:21:38 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2012-05-30 09:21:38 +0800 |
commit | 4daff951bfccbabe188cebcc4b166d100747e387 (patch) | |
tree | 7cfd70724b49683d69cc7857a57eb284a273d7fa | |
parent | 479ac13c1499793332cce4a555317f7ab228abf7 (diff) | |
download | vaapi-intel-driver-4daff951bfccbabe188cebcc4b166d100747e387.tar.gz vaapi-intel-driver-4daff951bfccbabe188cebcc4b166d100747e387.tar.bz2 vaapi-intel-driver-4daff951bfccbabe188cebcc4b166d100747e387.zip |
Don't render the target surface with background if alpha value is 0
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rwxr-xr-x | src/i965_post_processing.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c index b6038d2..de4c1f5 100755 --- a/src/i965_post_processing.c +++ b/src/i965_post_processing.c @@ -3724,7 +3724,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')) @@ -3732,6 +3732,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; |