video: tegra: dc: global alpha on 1 layer blend
authorDonghan Ryu <dryu@nvidia.com>
Wed, 15 May 2013 14:16:01 +0000 (23:16 +0900)
committerRiham Haidar <rhaidar@nvidia.com>
Sat, 1 Jun 2013 00:56:46 +0000 (17:56 -0700)
commit907d9e09eeb0db6041c2cba205a5e2ac2fa746e7
treeece7f80c42602660e429424851f8855f3dd98052
parente960eaf4a5c9c13054f474bae247a88185626d56
video: tegra: dc: global alpha on 1 layer blend

global alpha on 1 layer blending showed incorrect
blending because FIX_WEIGHT on B_BLEND_CONTROL_1WIN
is not per-pixel. This change programs premult and
coverage blending mode to produce following output.

premult case
    color.rgba = color.rgba * global_alpha;
    blended_color = previous_color * (1 - color.a) +
                    color;

coverage case
    color.a = color.a * global_alpha;
    blended_color = previous_color * (1 - color.a) +
                    vec4(color.rgb, 1) * color.a;

Bug 1276814

Change-Id: Ibb65fed58603e86ac8af4e4fd32f6c621eb57e7a
Signed-off-by: Donghan Ryu <dryu@nvidia.com>
Reviewed-on: http://git-master/r/228908
(cherry picked from commit 8f877cd48594945d0cca4e970755285f9b74ef2e)
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/233375
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
drivers/video/tegra/dc/window.c