hwc: use sourceCropF instead of sourceCrop from hwc_layer_t
- Always use sourceCropF instead of sourceCrop. - Change it to sourceCropF at places where sourceCrop used Change-Id: Ia64050a41a174f3f038c9b88d527d70c2240f2d9
This commit is contained in:
@@ -413,7 +413,7 @@ bool MDPComp::validateAndApplyROI(hwc_context_t *ctx,
|
|||||||
const hwc_layer_1_t* layer = &list->hwLayers[i];
|
const hwc_layer_1_t* layer = &list->hwLayers[i];
|
||||||
|
|
||||||
hwc_rect_t dstRect = layer->displayFrame;
|
hwc_rect_t dstRect = layer->displayFrame;
|
||||||
hwc_rect_t srcRect = layer->sourceCrop;
|
hwc_rect_t srcRect = integerizeSourceCrop(layer->sourceCropf);
|
||||||
int transform = layer->transform;
|
int transform = layer->transform;
|
||||||
trimLayer(ctx, mDpy, transform, srcRect, dstRect);
|
trimLayer(ctx, mDpy, transform, srcRect, dstRect);
|
||||||
|
|
||||||
@@ -464,7 +464,8 @@ void MDPComp::generateROI(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
|
|||||||
if ((mCachedFrame.hnd[index] != list->hwLayers[index].handle) ||
|
if ((mCachedFrame.hnd[index] != list->hwLayers[index].handle) ||
|
||||||
isYuvBuffer((private_handle_t *)list->hwLayers[index].handle)) {
|
isYuvBuffer((private_handle_t *)list->hwLayers[index].handle)) {
|
||||||
hwc_rect_t dstRect = list->hwLayers[index].displayFrame;
|
hwc_rect_t dstRect = list->hwLayers[index].displayFrame;
|
||||||
hwc_rect_t srcRect = list->hwLayers[index].sourceCrop;
|
hwc_rect_t srcRect = integerizeSourceCrop(
|
||||||
|
list->hwLayers[index].sourceCropf);
|
||||||
int transform = list->hwLayers[index].transform;
|
int transform = list->hwLayers[index].transform;
|
||||||
|
|
||||||
/* Intersect against display boundaries */
|
/* Intersect against display boundaries */
|
||||||
@@ -679,7 +680,7 @@ bool MDPComp::loadBasedComp(hwc_context_t *ctx,
|
|||||||
uint32_t batchPixelCount = 0;
|
uint32_t batchPixelCount = 0;
|
||||||
for(int j = i; j < i + batchSize; j++) {
|
for(int j = i; j < i + batchSize; j++) {
|
||||||
hwc_layer_1_t* layer = &list->hwLayers[j];
|
hwc_layer_1_t* layer = &list->hwLayers[j];
|
||||||
hwc_rect_t crop = layer->sourceCrop;
|
hwc_rect_t crop = integerizeSourceCrop(layer->sourceCropf);
|
||||||
batchPixelCount += (crop.right - crop.left) *
|
batchPixelCount += (crop.right - crop.left) *
|
||||||
(crop.bottom - crop.top);
|
(crop.bottom - crop.top);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -992,7 +992,7 @@ hwc_rect_t getUnion(const hwc_rect &rect1, const hwc_rect &rect2)
|
|||||||
also it avoid hole creation.*/
|
also it avoid hole creation.*/
|
||||||
void deductRect(const hwc_layer_1_t* layer, hwc_rect_t& irect) {
|
void deductRect(const hwc_layer_1_t* layer, hwc_rect_t& irect) {
|
||||||
hwc_rect_t& disprect = (hwc_rect_t&)layer->displayFrame;
|
hwc_rect_t& disprect = (hwc_rect_t&)layer->displayFrame;
|
||||||
hwc_rect_t& srcrect = (hwc_rect_t&)layer->sourceCrop;
|
hwc_rect_t srcrect = integerizeSourceCrop(layer->sourceCropf);
|
||||||
int irect_w = irect.right - irect.left;
|
int irect_w = irect.right - irect.left;
|
||||||
int irect_h = irect.bottom - irect.top;
|
int irect_h = irect.bottom - irect.top;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user