libhwcomposer: Enable COPYBIT_PREMULTIPLIED_ALPHA if the layer blending is premutliplied

Change-Id: Iefe0ddeaa20b4411074079bc77ac17cc0e38c27e
This commit is contained in:
Naomi Luis 2011-05-09 14:53:08 -07:00 committed by Govind Surti
parent 9c2ba115fd
commit c99d13825e

View File

@ -321,6 +321,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, 0xFF);
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, &copybitRegion);
if(err < 0)