Merge branch 'dev' of gitee.com:uniartisan2018/spark-store into dev

This commit is contained in:
uniartisan 2023-03-05 22:52:16 +08:00
commit 4bdcb2cf3c

@ -43,8 +43,33 @@ int main(int argc, char *argv[])
// 浏览器开启 GPU 支持
#ifdef __sw_64__
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--no-sandbox");
#elif __aarch64__
if (!Utils::isWayland()) {
QString env = QString::fromUtf8(qgetenv("QTWEBENGINE_CHROMIUM_FLAGS"));
env = env.trimmed();
/**
* NOTE: ARM CPU
* --disable-gpu X11
* --single-process X11 QtWebEngine
*/
env += " --disable-gpu";
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", env.trimmed().toUtf8());
QSurfaceFormat format;
format.setRenderableType(QSurfaceFormat::OpenGLES);
QSurfaceFormat::setDefaultFormat(format);
/**
* NOTE: https://zhuanlan.zhihu.com/p/550285855
* X11 QtWebEngine 退 QWidget
*/
qputenv("QMLSCENE_DEVICE", "softwarecontext");
DApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
}
#endif
/**
* FIXME: CPU QtWebEngine
* CPU wayland