R
R
Roman Chugunov2018-07-10 16:04:05
Chromium
Roman Chugunov, 2018-07-10 16:04:05

How to force Electron/chromium to use SwiftShader?

Hello.
I am developing an application on Electron under linux to work with figma.
I'm trying to add the SwiftShader library to an Electron app.
This is necessary if the user does not have hardware acceleration available, then the application will use software rendering via SwitfShader. If you add libraries from here
to the root folder , then Electron does not see them at all and chrome://gpu says that WebGL2 is not available.
Google chrome uses these libraries for itself and I took them from there, straight from chrome. From the same version of the chromium engine used in Electron 3.0.0 beta 1. In this case, Electron sees them and chrome://gpu says it's only available programmatically, as it should be. But in the application, figma renders projects incorrectly, so it still won't work. Here is a video of how figma works for me when the GPU is enabled, and when SwiftShader is enabled. But such a bug is only Chromium'e which is used in Electron. Those. in the browser, everything is correctly rendered through SwiftShader. And such a problem in all versions of Electron, and below version 1.8 - SwiftShader does not work at all.
Can someone suggest something? Maybe the developers of the chromium engine somehow modify the SwiftShader code for themselves? And maybe in chromium under Electron the same way?
PS. I noticed that assembled SwiftShader for chromium weigh less than just assembled ones that are in Google drive.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question