libhwcomposer: Honor the HWC_DO_NOT_USE_OVERLAY flag
If SurfaceFlinger marks a layer with the HWC_DO_NOT_USE_OVERLAY flag, do not use the overlay to draw the layer (cherry picked from commit 9271a839b6bbbdc7b22bd7f1dca6f4c0c63de965) Change-Id: Ie44586a1254a2dc2ad41ae902debc5bb442cbfde
This commit is contained in:
parent
3a6d435d35
commit
4066a02c83
@ -57,7 +57,8 @@ enum HWCCompositionType {
|
||||
};
|
||||
|
||||
enum HWCPrivateFlags {
|
||||
HWC_USE_ORIGINAL_RESOLUTION = 0x10000000, // This layer is to be drawn using overlays
|
||||
HWC_USE_ORIGINAL_RESOLUTION = HWC_FLAGS_PRIVATE_0, // This layer is to be drawn using overlays
|
||||
HWC_DO_NOT_USE_OVERLAY = HWC_FLAGS_PRIVATE_1, // Do not use overlays to draw this layer
|
||||
};
|
||||
|
||||
enum HWCLayerType{
|
||||
@ -203,7 +204,8 @@ static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list) {
|
||||
if (list) {
|
||||
for (size_t i=0 ; i<list->numHwLayers; i++) {
|
||||
private_handle_t *hnd = (private_handle_t *)list->hwLayers[i].handle;
|
||||
if(hnd && (hnd->bufferType == BUFFER_TYPE_VIDEO)) {
|
||||
if(hnd && (hnd->bufferType == BUFFER_TYPE_VIDEO) &&
|
||||
!(list->hwLayers[i].flags & HWC_DO_NOT_USE_OVERLAY)) {
|
||||
yuvBufferCount++;
|
||||
if (yuvBufferCount > 1) {
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user