From 6f273c5c6ec079c6400c2309f496215bd1ba9bd0 Mon Sep 17 00:00:00 2001 From: Naseer Ahmed Date: Wed, 11 Jan 2012 16:31:57 +0530 Subject: [PATCH] hwcomposer: Enable dithering if FB format is RGB565 CRs-fixed: 329362 (cherry picked from commit acd73753d1da0ba587fea91a2605229c7274e7b7) Change-Id: I5155e98a87d17066fab6075d2b067175e4a6b56c --- libhwcomposer/hwcomposer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libhwcomposer/hwcomposer.cpp b/libhwcomposer/hwcomposer.cpp index 7cc1531..3590cec 100755 --- a/libhwcomposer/hwcomposer.cpp +++ b/libhwcomposer/hwcomposer.cpp @@ -1057,6 +1057,8 @@ static int drawLayerUsingCopybit(hwc_composer_device_t *dev, hwc_layer_t *layer, (layer->blending == HWC_BLENDING_NONE) ? -1 : layer->alpha); copybit->set_parameter(copybit, COPYBIT_PREMULTIPLIED_ALPHA, (layer->blending == HWC_BLENDING_PREMULT)? COPYBIT_ENABLE : COPYBIT_DISABLE); + copybit->set_parameter(copybit, COPYBIT_DITHER, + (dst.format == HAL_PIXEL_FORMAT_RGB_565)? COPYBIT_ENABLE : COPYBIT_DISABLE); err = copybit->stretch(copybit, &dst, &src, &dstRect, &srcRect, ©bitRegion); if(err < 0)