Permalink
Browse files

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
(cherry picked from commit 8c8edc4)

Change-Id: I0355059ed0afa8bf88125a027be7fe37b78ec2aa
  • Loading branch information...
1 parent 3b441cb commit e5cb40319ff7a2c24ac52094d7a60da79d9d4dc6 Prabhanjan Kandula committed with Ramakrishna Prasad N Mar 19, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 libhwcomposer/hwcomposer.cpp
@@ -1293,12 +1293,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;
@@ -1325,7 +1323,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;

0 comments on commit e5cb403

Please sign in to comment.