--- a/LPCSVGHMI.py Fri Jan 14 09:42:57 2022 +0100
+++ b/LPCSVGHMI.py Tue Jun 21 09:40:46 2022 +0200
@@ -65,15 +65,24 @@
# When we were using EVDEV, this was how rotation was done:
# 'QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=rotate=' + touch_angle + \
- browser_commandline = 'TSLIB_CONFFILE=/etc/ts_' + touch_angle + ".conf" \
- ' QT_QPA_EGLFS_ROTATION=' + eglfs_angle + \
- ' qt_webenginewidgets_minimal' + \
- ' --js-flags="--max_old_space_size=16 --gc_interval=100 --optimize_for_size"' + \
- ' --single-process' + \
- ' --no-sandbox "' + svghmi_options["url"] + '"'
+ browser_commandline = ('TSLIB_CONFFILE=/etc/ts_' + touch_angle + ".conf" + + ' QT_QPA_EGLFS_ROTATION=' + eglfs_angle + + ' qt_webenginewidgets_minimal' + + # JavaScript VM optimization for small memory + ' --js-flags="--max_old_space_size=16 --gc_interval=100 --optimize_for_size"' + + # Flags to enable all possible GPU acceleration + ' --ignore-gpu-blacklist --enable-gpu-rasterization' + + ' --enable-hardware-overlays=single-fullscreen' + + ' --enable-gpu-memory-buffer-video-frames' + + ' --disable-gpu-sandbox --enable-native-gpu-memory-buffers' + + ' --enable-oop-rasterization --enable-zero-copy' + + # Avoid security bloat since serving local HMI + ' --no-sandbox "' + svghmi_options["url"] + '"') {"LPCBrowserStart": "sh -c '"+browser_commandline+"'",
+ "LPCBrowserStartDebug": "sh -c '"+browser_commandline+" --remote-debugging-port=9988"+"'", "LPCBrowserStop": "killall qt_webenginewidgets_minimal",
"LPCBrowserRestart": "sh -c 'killall qt_webenginewidgets_minimal; sleep 1; "+browser_commandline+" '"})
@@ -85,6 +94,8 @@
SVGHMI.get_SVGHMI_options = get_SVGHMI_options