libhwcomposer: Enhance mixed mode composition.
While marking layers for cache, neglect the z-order when possible, to improve the scope of mixed mode usage. It is safe to neglect the z-order if a static layer doesn't have any overlapping region with updating layers in between static layer & contiguous static layers batch. - if above layer doesn't have any overlapping with updating layer in middle, push it to the batch. - If above case fails, but layers below(existing batch) does not have any overlapping region with the updating layer, bring the batch to top and modify fb-zorder accordingly. Change-Id: I4882a750d0a9a2e11272fcbb146202160673d04f
This commit is contained in:
@@ -923,6 +923,13 @@ void calculate_crop_rects(hwc_rect_t& crop, hwc_rect_t& dst,
|
||||
crop_b -= crop_h * bottomCutRatio;
|
||||
}
|
||||
|
||||
bool areLayersIntersecting(const hwc_layer_1_t* layer1,
|
||||
const hwc_layer_1_t* layer2) {
|
||||
hwc_rect_t irect = getIntersection(layer1->displayFrame,
|
||||
layer2->displayFrame);
|
||||
return isValidRect(irect);
|
||||
}
|
||||
|
||||
bool isValidRect(const hwc_rect& rect)
|
||||
{
|
||||
return ((rect.bottom > rect.top) && (rect.right > rect.left)) ;
|
||||
|
||||
Reference in New Issue
Block a user