hwcomposer: Inform gralloc about video before prepareOverlay
prepareOverlay will setup the channels for video playback, so inform gralloc to close UI channels before they are setup. Change-Id: I757a8fd79661eb66ccbe2ac1475e48740bbf1733 CRs-fixed: 298102
This commit is contained in:
		
				
					committed by
					
						 Govind Surti
						Govind Surti
					
				
			
			
				
	
			
			
			
						parent
						
							6e3e6e0300
						
					
				
				
					commit
					370a5212ce
				
			| @@ -169,14 +169,10 @@ static int hwc_updateOverlayStatus(hwc_context_t* ctx, int layerType) { | ||||
|         return -1; | ||||
|     } | ||||
|  | ||||
|     if ((layerType & HWC_STOP_UI_MIRRORING_MASK) && | ||||
|         (OVERLAY_CHANNEL_DOWN == ovLibObject->getChannelStatus())) { | ||||
|     if (layerType & HWC_STOP_UI_MIRRORING_MASK) { | ||||
|         // Inform the gralloc to stop UI mirroring | ||||
|         fbDev->videoOverlayStarted(fbDev, true); | ||||
|     } | ||||
|  | ||||
|     if ((OVERLAY_CHANNEL_UP == ovLibObject->getChannelStatus()) && | ||||
|         !(layerType & HWC_STOP_UI_MIRRORING_MASK)) { | ||||
|     } else { | ||||
|         // Video mirroring is going on, and we do not have any layers to | ||||
|         // mirror directly. Close the current video channel and inform the | ||||
|         // gralloc to start UI mirroring | ||||
| @@ -399,6 +395,12 @@ static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list) { | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         if (list->flags & HWC_GEOMETRY_CHANGED) { | ||||
|             layerType |= (yuvBufferCount == 1) ? HWC_SINGLE_VIDEO: 0; | ||||
|             // Inform the gralloc of the current HDMI status | ||||
|             hwc_updateOverlayStatus(ctx, layerType); | ||||
|         } | ||||
|  | ||||
|         for (size_t i=0 ; i<list->numHwLayers ; i++) { | ||||
|             private_handle_t *hnd = (private_handle_t *)list->hwLayers[i].handle; | ||||
|             // If there is a single Fullscreen layer, we can bypass it - TBD | ||||
| @@ -435,12 +437,6 @@ static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list) { | ||||
|         } else { | ||||
|             list->flags &= ~HWC_SKIP_COMPOSITION; | ||||
|         } | ||||
|  | ||||
|         if (list->flags & HWC_GEOMETRY_CHANGED) { | ||||
|             layerType |= (yuvBufferCount == 1) ? HWC_SINGLE_VIDEO: 0; | ||||
|             // Inform the gralloc of the current HDMI status | ||||
|             hwc_updateOverlayStatus(ctx, layerType); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     return 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user