From 72e6062ee9d441fbdbe5328afcbf9ea2d7fd5020 Mon Sep 17 00:00:00 2001 From: Prabhanjan Kandula Date: Mon, 19 Mar 2012 19:54:32 +0530 Subject: [PATCH] libhwcomposer: Remove dimension Align checks for copybit gralloc is already taking care of source buffer width alignment based on the color format.Alignment should be based on source format, But not dependent on FB format. CRs-fixed: 344311 355814 (cherry picked from commit 8c8edc440288def7017eb12d93391cb785196f55) Change-Id: Id83f926068d65896b6c7bb93dd086aa9d8c3b406 --- libhwcomposer/hwcomposer.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libhwcomposer/hwcomposer.cpp b/libhwcomposer/hwcomposer.cpp index b8d7815..8d4c8f1 100644 --- a/libhwcomposer/hwcomposer.cpp +++ b/libhwcomposer/hwcomposer.cpp @@ -1358,12 +1358,10 @@ static int drawLayerUsingCopybit(hwc_composer_device_t *dev, hwc_layer_t *layer, genlock_unlock_buffer(hnd); return -1; } - int alignment = 32; - if( HAL_PIXEL_FORMAT_RGB_565 == fbHandle->format ) - alignment = 16; - // Set the copybit source: + + // Set the copybit source: copybit_image_t src; - src.w = ALIGN(hnd->width, alignment); + src.w = hnd->width; src.h = hnd->height; src.format = hnd->format; src.base = (void *)hnd->base; @@ -1390,7 +1388,7 @@ static int drawLayerUsingCopybit(hwc_composer_device_t *dev, hwc_layer_t *layer, // Copybit dst copybit_image_t dst; - dst.w = ALIGN(fbHandle->width,alignment); + dst.w = fbHandle->width; dst.h = fbHandle->height; dst.format = fbHandle->format; dst.base = (void *)fbHandle->base;