hwc/overlay: Add premultiplied alpha support.
Add premultiplied alpha support to video and mdp comp features. Change-Id: Ieddaf82d5cc43c455bd1c10dbc82b0fc016903ea
This commit is contained in:
parent
e684abd1ec
commit
8904b7a648
@ -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,
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user