libhwcomposer: Mark layers below skip-layers for GPU composition
If module composition type is MDP or C2D and we have a skipped layer (usually layers without backing buffers, layers with "invalid" orientations or debug layers), mark every HWC layer below this layer for GPU composition. This logic is needed because ICS SF composes a bunch of z-ordered HWC_FRAMEBUFFER (GPU) layers first and then the remaining bunch of z-ordered HWC_OVERLAY layers last which breaks the overall z-ordered layer rendering requirement. This logic also holds valid for 2-layer bypass in ICS. Change-Id: I5082affac8affd6b19d78be827d149901945a163
This commit is contained in:
parent
8287f5bbcb
commit
d120c0dfac
@ -863,6 +863,28 @@ static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list) {
|
||||
// need to still mark the layer for S3D composition
|
||||
if (isS3DCompositionNeeded)
|
||||
markUILayerForS3DComposition(list->hwLayers[i], s3dVideoFormat);
|
||||
|
||||
if (hwcModule->compositionType
|
||||
& (COMPOSITION_TYPE_C2D | COMPOSITION_TYPE_MDP)) {
|
||||
// Ensure that HWC_OVERLAY layers below skip layers do not
|
||||
// overwrite GPU composed skip layers.
|
||||
ssize_t layer_countdown = ((ssize_t)i) - 1;
|
||||
while (layer_countdown >= 0)
|
||||
{
|
||||
// Mark every non-mdp overlay layer below the
|
||||
// skip-layer for GPU composition.
|
||||
switch(list->hwLayers[layer_countdown].compositionType) {
|
||||
case HWC_FRAMEBUFFER:
|
||||
case HWC_USE_OVERLAY:
|
||||
break;
|
||||
case HWC_USE_COPYBIT:
|
||||
default:
|
||||
list->hwLayers[layer_countdown].compositionType = HWC_FRAMEBUFFER;
|
||||
break;
|
||||
}
|
||||
layer_countdown--;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (hnd && (hnd->bufferType == BUFFER_TYPE_VIDEO) && (yuvBufferCount == 1)) {
|
||||
|
Loading…
Reference in New Issue
Block a user