office-gobmx/sd/qa
Mike Kaganski 91b4bfee9d Enable Skia in unit tests
CreateSalInstance will set aUsePlugin to "svp" in case it is in
SAL_USE_VCLPLUGIN environment variable (can be controlled using
gb_CppunitTest_use_vcl_non_headless in makefiles); when true is
returned from Application::IsBitmapRendering(); or when true is
returned from IsHeadlessModeRequested() (e.g., when '--headless'
is used in the command line). The latter is true for most of the
CppunitTests, including CppunitTest_vcl_skia (it may be controlled
by gb_CppunitTest_use_vcl_non_headless_with_windows in makefiles).

Then this would ensure that Application::EnableBitmapRendering is
called.

isVCLSkiaEnabled gave false, when Application::IsBitmapRendering
was true, which meant that all tests in CppunitTest_vcl_skia
effectively didn't run at all.

With this change, on platforms where there's no 'svp' plugin,
Skia will be enabled in unit tests in software mode: Windows and
macOS.

Fix bug in a couple of places, where the SkAutoCanvasRestore
needs to be destructed before we call other code, otherwise
we hit an assert in destroySurface().

Disable the vcl XOR test and CppunitTest_sd_png_export_tests,
in skia mode, just so we can just this commit
in, that will need further investigation.

Tweak assert in addPolygonToPath to account for case where
polygon has zero points.

Change-Id: Idc0a66d27deb3cf09f631a42bbe037714ebcdc0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155952
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-13 08:16:45 +01:00
..
filter/eppt
uitest
unit Enable Skia in unit tests 2023-12-13 08:16:45 +01:00
unoapi