Permalink
Browse files

Revert "libhwcomposer: Remove dimension Align checks for copybit"

This reverts commit e5cb403

Change-Id: I6b8d0027b226e8cdcad1f6a630a7c7df8bd95762
  • Loading branch information...
Praveena Pachipulusu
Praveena Pachipulusu committed Apr 23, 2012
1 parent b16015a commit c33508a236fd392c617bb97ede9b6ab25ea5a2d1
Showing with 6 additions and 4 deletions.
  1. +6 −4 libhwcomposer/hwcomposer.cpp
@@ -1303,10 +1303,12 @@ static int drawLayerUsingCopybit(hwc_composer_device_t *dev, hwc_layer_t *layer,
genlock_unlock_buffer(hnd);
return -1;
}
-
- // Set the copybit source:
+ int alignment = 32;
+ if( HAL_PIXEL_FORMAT_RGB_565 == fbHandle->format )
+ alignment = 16;
+ // Set the copybit source:
copybit_image_t src;
- src.w = hnd->width;
+ src.w = ALIGN(hnd->width, alignment);
src.h = hnd->height;
src.format = hnd->format;
src.base = (void *)hnd->base;
@@ -1333,7 +1335,7 @@ static int drawLayerUsingCopybit(hwc_composer_device_t *dev, hwc_layer_t *layer,
// Copybit dst
copybit_image_t dst;
- dst.w = fbHandle->width;
+ dst.w = ALIGN(fbHandle->width,alignment);
dst.h = fbHandle->height;
dst.format = fbHandle->format;
dst.base = (void *)fbHandle->base;

0 comments on commit c33508a

Please sign in to comment.