From be16ac8fdbc8513770d2d83c637a57b273ec177f Mon Sep 17 00:00:00 2001 From: Huan Truong Date: Sat, 24 Feb 2018 17:07:54 +0000 Subject: [PATCH] [omxplayer] Fix overdraw bug for QT EGL Backend On Qt5 OGL backend, the default draw layer for the UI is 1. OMXplayer draws on layer 0, thus the interface never shows up. This forces OMXplayer to draw on layer 2. --- src/autoapp/Projection/OMXVideoOutput.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/autoapp/Projection/OMXVideoOutput.cpp b/src/autoapp/Projection/OMXVideoOutput.cpp index 4097f8f..8f2e6d4 100644 --- a/src/autoapp/Projection/OMXVideoOutput.cpp +++ b/src/autoapp/Projection/OMXVideoOutput.cpp @@ -114,8 +114,12 @@ bool OMXVideoOutput::setFullscreen() displayRegion.nSize = sizeof(OMX_CONFIG_DISPLAYREGIONTYPE); displayRegion.nVersion.nVersion = OMX_VERSION; displayRegion.nPortIndex = 90; - - displayRegion.set = static_cast(OMX_DISPLAY_SET_FULLSCREEN | OMX_DISPLAY_SET_NOASPECT); + + //EGL surface needs the OMX layer to be 2 + //Otherwise the Qt UI will draw on top of it + displayRegion.layer = 2; + + displayRegion.set = static_cast(OMX_DISPLAY_SET_FULLSCREEN | OMX_DISPLAY_SET_NOASPECT | OMX_DISPLAY_SET_LAYER); displayRegion.fullscreen = OMX_TRUE; displayRegion.noaspect = OMX_TRUE;