libhwcomposer: Disable alpha if layer blending is disabled
If the layer blending has been disabled, disable copybit alpha so that copybit does not perform any blend operation. Change-Id: I9a83fad0f126adaf9540bc72d17e7dcb1c55cd0f CRs-fixed: 288527
This commit is contained in:
parent
371fe1a442
commit
c17c053935
@ -336,7 +336,8 @@ static int drawLayerUsingCopybit(hwc_composer_device_t *dev, hwc_layer_t *layer,
|
||||
|
||||
copybit_device_t *copybit = hwcModule->copybitEngine;
|
||||
copybit->set_parameter(copybit, COPYBIT_TRANSFORM, layer->transform);
|
||||
copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, layer->alpha);
|
||||
copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA,
|
||||
(layer->blending == HWC_BLENDING_NONE) ? 0xFF : layer->alpha);
|
||||
copybit->set_parameter(copybit, COPYBIT_PREMULTIPLIED_ALPHA,
|
||||
(layer->blending == HWC_BLENDING_PREMULT)? COPYBIT_ENABLE : COPYBIT_DISABLE);
|
||||
int err = copybit->stretch(copybit, &dst, &src, &dstRect, &srcRect, ©bitRegion);
|
||||
|
Loading…
Reference in New Issue
Block a user