flathub / org.libreoffice.LibreOffice

https://flathub.org/apps/details/org.libreoffice.LibreOffice
29 stars 18 forks source link

Can Skia be reenabled in the Flatpak build? #213

Closed RushingAlien closed 1 year ago

RushingAlien commented 1 year ago

Hey! With fd,o runtime 21.08, the skia renderer was disabled at build because it kept failing to build with the runtime. But we are now building against the 22.08 runtime, would it be possible to reenable the skia renderer then?

121705: Flatpak: Upgrade to 21.08 runtime, disable Skia | https://gerrit.libreoffice.org/c/core/+/121705

stbergmann commented 1 year ago

Of course, we could give it another try. But do you have a use case for it? Note

But including Skia in the Linux flatpak isn't too useful anyway (and just
happened to be on by default):  First, it is disabled by default on Linux, cf.
UseSkia in officecfg/registry/data/org/openoffice/Office/Common.xcu.  And
second, on Linux it can only be enabled for SAL_USE_VCLPLUGIN=gen, but not for
the gtk3 plugin that the flatpak normally uses, cf.
OfaViewTabPage::UpdateSkiaStatus in cui/source/options/optgdlg.cxx.

in the commit message of https://git.libreoffice.org/core/+/9d88f11de57bcbeb29fa6f1299d5d0867c1a75a4%5E%21 "Flatpak: Upgrade to 21.08 runtime, disable Skia". So you'd need to explicitly run the LO flatpak with the SAL_USE_VCLPLUGIN=gen environment variable and then check "Tools - Options - LibreOffice - View - Graphics Output - Use Skia for all rendering" to enable it.

RushingAlien commented 1 year ago

Thanks for the response! For me, the current renderer isn't very optimal, I commonly use GIFs and animations in my presentations, but it lags a ton on my hardware (Ryzen 5 3500U, 12 GiB of RAM). I had tested out Skia+Vulkan renderer outside the Flatpak, and it's just much smoother, so I'd like to have the option even if I have to workaround for it.

RushingAlien commented 1 year ago

Also you may find this same report on the bugzilla, Sorry for that, I wasn't really sure where to post the issue, so I posted to both :pray:

stbergmann commented 1 year ago

So SAL_USE_VCLPLUGIN=gen flatpak run --nosocket=wayland org.libreoffice.LibreOffice lets you enable Skia via "Tools - Options - LibreOffice - View - Graphics Output - Use Skia for all rendering", but note that in this flatpak Skia gets build with GCC rather than Clang, so AFAIU lacks some performance optimizations.