[Development] Resizing screen with application running on eglfs

Will Wagner willw at carallon.com
Mon Jul 7 17:27:27 CEST 2014


I have an application running on embedded hardware that need to be able 
to change the resolution of the screen whilst the application is running 
in response to the user plugging in a new monitor. I have previously had 
this successfully working with Qt4 (via a custom patch) and and now 
trying to write a similar patch for Qt5.

Has anyone looked at doing this already?

I have written some code to try to do this, the overall aim is to 
cleanup all the calls into egl, call eglTerminate and then reinit. I am 
attempting to do this without deleting either the QEGLPlatformScreen or 
the root QEGLPlatformWindow

The basic call flow I have is:
- call QEglFSWindow::invalidateSurface() on the compositing window
- delete and clear the screens rootContext
- call eglTerminate
- call eglInitialize
- call QEglFSWindow::resetSurface() on the compositing window
- create a new egl context and set as screens rootContext

I have code that runs but doesn't actually render anything to screen. I 
have stepped through the code and can't see why it shouldn't be 
rendering on screen. I have ensured that the QEGLPlatformBackingStore 
and QEGLCompositor both rebuild their textures.

So I guess my questions are:
- Does this approach seem sensible, if I persevere might I actually get 
- Is there a better way of doing this (I know the best way would be to 
use wayland but the hardware vendor doesn't supply libraries for this)
- Can anyone suggest more things that may need reinitialing in order to 
get this working?


Will Wagner                                     will_wagner at carallon.com
Development Manager                      Office Tel: +44 (0)20 7471 9224
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA

More information about the Development mailing list