Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Two SurfaceViews in my Activity



  • Hi everyone
    I have a Qt application for android that has some particular features:

    • It starts a QtActivity but later you may navigate to other activities
    • It uses Open GLES 3.2 to render in a widget set as the center widget of my QWindow

    The problem is that I'm getting a random graphical issue specially when the screen is rotated. To describe the graphical issue I will say my scene is overlayed by a semi-transparent corrupted frame. I've already debugged my application and dumped the default framebuffer to an image file when the image is corrupted on the screen and I don't see the corruption in the file. So my guess is in the underlying qt/android views system.
    In SurfaceFlinger's logs I see 2 SurfaceViews for my Activity, something like this

    Display[0] configurations (* current):
    * 0: 1440x2960, xdpi=562.706970, ydpi=565.293030, refresh=16666666, colorMode=0
    numHwLayers=3, flags=00000000
    type | handle | hint | flag | tr | blnd | format | source crop (l,t,r,b) | frame | name
    -----------+----------+------+------+----+------+-------------+--------------------------------+------------------------+------
    HWC | 743e62b380 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 1080.0, 2220.0 | 0, 0, 1080, 2220 | SurfaceView - com.package/com.package.MyActivity@c03bea1@14#0
    HWC | 743ea56420 | 0000 | 0000 | 04 | 0105 | RGBA_8888 | 0.0, 0.0, 2220.0, 1080.0 | 0, 0, 1080, 2220 | SurfaceView - com.package/com.package.MyActivity@5a97be1@0#0
    FB TARGET | 743ea558c0 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 1440.0, 2960.0 | 0, 0, 1440, 2960 | HWC_FRAMEBUFFER_TARGET

    Is it normal to have more than one SurfaceView for a single activity? This happens also if I remove screen rotation.

    Thanks in advance!
    Gabriel


Log in to reply