lpcmanager

Parents 88e947924472
Children f299e9b6a5e3
SVGHMI: updated browser commandline flags to enable all possible GPU accelereation.
Added LPCBrowserStartDebug option to easily enable remote HMI debugging.
  • +17 -6
    LPCSVGHMI.py
  • --- 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
    + ' --single-process' +
    + ' --no-sandbox "' + svghmi_options["url"] + '"')
    svghmi_options.update(
    {"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 @@
    return svghmi_options
    +
    +
    SVGHMI.get_SVGHMI_options = get_SVGHMI_options
    def getDefaultSVG(self):