[Qtwebengine] QT5.6.2 to 5.7.1 default behavior changes and qtWebengine ozone bridge

Ruei, Eric e-ruei1 at ti.com
Wed Mar 22 19:42:41 CET 2017


Hi, All:

I have a few questions and some interesting observations regarding qtwebengine 5.6.2 and 5.7.1.
Your kind assistance will be highly appreciated.


1.       For qtwebengine 5.6.2, the SUID sandbox is not supported and disabled with chromium command-line option -no-sandbox within the webengine context code or by build options. Do you know where this option is added?

2.       For qtwebengine 5.7.1, the Chromium LOG(ERROR, FATAL) is enabled by default. Do you know how the logging is enabled?

3.       For qtwebengine 5.7.1,  it looks like that the SUID sandbox is enabled by default. For embedded linux, where does the sandbox binary reside? Do we need kernel support to use SUID sandbox?

4.       The QtWebengine contains some platform related code under src/core, which seems to either implement the chromium ozone layer or provide a bridge between Chromium and the QT platform code. In the function SurfaceFactoryQt::LoadEGLGLES2Bindings() @ surface_factory_qt.cpp, the hard-coded library libGLESv2.so.2 is loaded and if the library does not exist, this function will fail and return false and the function GLSurface::CreateOffscreenGLSurface() @ gl_surface_qt.cpp will also fail and return NULL subsequently.
The interesting observation is that the qtwebengine demo browser will still work with GPU rendering whether or not the above failure occurs.
Therefore, the EGLGLES2 related initialization does not seem to have any effect on the qtwebengine operation and the corresponding errors may be ignored.
 If it is true, should we update the latest GLSurface::CreateOffscreenGLSurface() implementation at QT 5.7.1 to avoid potential system crash due to Q_UNREACHABLE() macro()?.

scoped_refptr<GLSurface>
GLSurface::CreateOffscreenGLSurface(const gfx::Size& size)
{
    scoped_refptr<GLSurface> surface;
    switch (GetGLImplementation()) {
    case kGLImplementationDesktopGL: {
        surface = new GLSurfaceQtWGL(size);
        if (surface->Initialize())
            return surface;
        break;
#elif defined(USE_X11)
        if (!g_initializedEGL) {
            surface = new GLSurfaceQtGLX(size);
            if (surface->Initialize())
                return surface;
        }
        // no break
#endif
    }
    case kGLImplementationEGLGLES2: {
        if (g_egl_surfaceless_context_supported)
            surface = new GLSurfacelessQtEGL(size);
        else
            surface = new GLSurfaceQtEGL(size);

        if (surface->Initialize())
            return surface;
        break;
    }
    default:
        printf("GLSurface::CreateOffscreenGLSurface: %d!\n", GetGLImplementation());
        break;
    }
    LOG(ERROR) << "Requested OpenGL platform is not supported.";
  //Q_UNREACHABLE();
    return NULL;
}

Best regards,

Eric Ruei


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qtwebengine/attachments/20170322/4f301036/attachment.html>


More information about the QtWebEngine mailing list