Why does the GTK3 vcl sal plugin default to SvpSalGraphics / software rendering?

Caolán McNamara caolanm at redhat.com
Wed Feb 14 13:37:53 UTC 2018

On Wed, 2018-02-14 at 12:29 +0100, Clemens Eisserer wrote:
> When compiled for GTK3 GtkInstance::CreateVirtualDevice always
> returns a SvpSalVirtualDevice (instead of a CreateX11VirtualDevice),
> which in turn seems to be unconditionally backed by a cairo image
> surface. This is also what I am seeing in my profiles, as soon as I
> switch to GTK3 all time is spent inside some cairo/pixman software
> loops.
> Maybe this was done by accident and nobody noticed 

No, its not by accident that the Svp variant is used for gtk3 even
under X.

It might be worth in GtkInstance::CreateVirtualDevice casting the pG
argument to a GtkSalGraphics (which is what it is I believe) and using
the mpWindow member of that as a path to get the GdkWindow argument for

gdk_window_create_similar_image_surface/gdk_window_create_similar_surface and inheriting a GtkSalVirtualDevice from SvpSalVirtualDevice to override SetSizeUsingBuffer in order to call those instead of cairo_image_surface_create

More information about the LibreOffice mailing list