Merge "h/q/d: Optimize layer rects on sourceCropf"

This commit is contained in:
Linux Build Service Account
2014-01-17 16:41:47 -08:00
committed by Gerrit - the friendly Code Review server

View File

@@ -1093,7 +1093,8 @@ void optimizeLayerRects(hwc_context_t *ctx,
if(!needsScaling(&list->hwLayers[j])) { if(!needsScaling(&list->hwLayers[j])) {
hwc_layer_1_t* layer = (hwc_layer_1_t*)&list->hwLayers[j]; hwc_layer_1_t* layer = (hwc_layer_1_t*)&list->hwLayers[j];
hwc_rect_t& bottomframe = layer->displayFrame; hwc_rect_t& bottomframe = layer->displayFrame;
hwc_rect_t& bottomCrop = layer->sourceCrop; hwc_rect_t bottomCrop =
integerizeSourceCrop(layer->sourceCropf);
int transform =layer->transform; int transform =layer->transform;
hwc_rect_t irect = getIntersection(bottomframe, topframe); hwc_rect_t irect = getIntersection(bottomframe, topframe);
@@ -1103,7 +1104,11 @@ void optimizeLayerRects(hwc_context_t *ctx,
dest_rect = deductRect(bottomframe, irect); dest_rect = deductRect(bottomframe, irect);
qhwc::calculate_crop_rects(bottomCrop, bottomframe, qhwc::calculate_crop_rects(bottomCrop, bottomframe,
dest_rect, transform); dest_rect, transform);
//Update layer sourceCropf
layer->sourceCropf.left = bottomCrop.left;
layer->sourceCropf.top = bottomCrop.top;
layer->sourceCropf.right = bottomCrop.right;
layer->sourceCropf.bottom = bottomCrop.bottom;
} }
} }
j--; j--;