Skip to content

Commit a70e9b4

Browse files
committed
Use new OMX_DISPLAY_ALPHA_FLAGS_DISCARD_LOWER_LAYERS flag to avoid having to blank screen
Note: Requires updated firmware
1 parent a3ae908 commit a70e9b4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

OMXVideo.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ bool COMXVideo::PortSettingsChanged()
217217
configDisplay.num = m_config.display;
218218
configDisplay.layer = m_config.layer;
219219
configDisplay.transform = m_transform;
220+
221+
if (!(m_config.dst_rect.x2 > m_config.dst_rect.x1 && m_config.dst_rect.y2 > m_config.dst_rect.y1))
222+
configDisplay.alpha |= OMX_DISPLAY_ALPHA_FLAGS_DISCARD_LOWER_LAYERS;
223+
220224
omx_err = m_omx_render.SetConfig(OMX_IndexConfigDisplayRegion, &configDisplay);
221225
if(omx_err != OMX_ErrorNone)
222226
{
@@ -912,6 +916,9 @@ void COMXVideo::SetAlpha(int alpha)
912916
configDisplay.set = OMX_DISPLAY_SET_ALPHA;
913917
configDisplay.alpha = alpha;
914918

919+
if (!(m_config.dst_rect.x2 > m_config.dst_rect.x1 && m_config.dst_rect.y2 > m_config.dst_rect.y1))
920+
configDisplay.alpha |= OMX_DISPLAY_ALPHA_FLAGS_DISCARD_LOWER_LAYERS;
921+
915922
omx_err = m_omx_render.SetConfig(OMX_IndexConfigDisplayRegion, &configDisplay);
916923
if(omx_err != OMX_ErrorNone)
917924
{

0 commit comments

Comments
 (0)