vcl/unx/generic/gdi/salgdi.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
New commits: commit f1169fd8ef86098f4bb4d03501ecab6d7186f9b1 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Apr 15 16:53:51 2021 +0100 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Fri Apr 16 09:02:25 2021 +0200 X11SalGraphics::SupportsCairo is pretty slow and its value won't change seen in tdf#140639 with https://wiki.documentfoundation.org/Development/How_to_debug#Performance_debugging_.28perf.29 perf record --call-graph dwarf,65528 --pid=`pidof soffice.bin` perf script | ~/git/FlameGraph/stackcollapse-perf.pl | ~/git/FlameGraph/flamegraph.pl --width 4096 --height 24 > perf.svg Change-Id: Ibb3b2bdd57adcabf74f38c35878cf2c00e1e5de0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114172 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 92a589357e9f..b5bb273b2bf2 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -509,9 +509,12 @@ void X11SalGraphics::Flush() bool X11SalGraphics::SupportsCairo() const { - Display *pDisplay = GetXDisplay(); - int nDummy; - return XQueryExtension(pDisplay, "RENDER", &nDummy, &nDummy, &nDummy); + static bool bSupportsCairo = [this] { + Display *pDisplay = GetXDisplay(); + int nDummy; + return XQueryExtension(pDisplay, "RENDER", &nDummy, &nDummy, &nDummy); + }(); + return bSupportsCairo; } cairo::SurfaceSharedPtr X11SalGraphics::CreateSurface(const cairo::CairoSurfaceSharedPtr& rSurface) const _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits