hwc/overlay: Add premultiplied alpha support.

Add premultiplied alpha support to video and mdp comp features.

Change-Id: Ieddaf82d5cc43c455bd1c10dbc82b0fc016903ea
This commit is contained in:
Saurabh Shah 2012-08-20 15:25:28 -07:00 committed by Andrew Sutherland
parent e684abd1ec
commit 8904b7a648
2 changed files with 11 additions and 4 deletions

View File

@ -294,12 +294,15 @@ int MDPComp::prepare(hwc_context_t *ctx, hwc_layer_t *layer,
ovutils::Whf info(hnd->width, hnd->height, hnd->format, hnd->size);
ovutils::eMdpFlags mdpFlags = mdp_info.isVG ? ovutils::OV_MDP_PIPE_SHARE
: ovutils::OV_MDP_FLAGS_NONE;
ovutils::eIsFg isFG = mdp_info.isFG ? ovutils::IS_FG_SET
: ovutils::IS_FG_OFF;
ovutils::setMdpFlags(mdpFlags, ovutils::OV_MDP_BACKEND_COMPOSITION);
if (layer->blending == HWC_BLENDING_PREMULT) {
ovutils::setMdpFlags(mdpFlags, ovutils::OV_MDP_BLEND_FG_PREMULT);
ovutils::eIsFg isFG = mdp_info.isFG ? ovutils::IS_FG_SET
: ovutils::IS_FG_OFF;
if(layer->blending == HWC_BLENDING_PREMULT) {
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_BLEND_FG_PREMULT);
}
ovutils::PipeArgs parg(mdpFlags,
info,
zOrder,

View File

@ -115,6 +115,10 @@ bool configPrimVid(hwc_context_t *ctx, hwc_layer_t *layer) {
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_SECURE_OVERLAY_SESSION);
}
if(layer->blending == HWC_BLENDING_PREMULT) {
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_BLEND_FG_PREMULT);
}
ovutils::eIsFg isFgFlag = ovutils::IS_FG_OFF;
if (ctx->numHwLayers == 1) {