Related: tdf#125670 avoid possible performance issues for the general case

but retain recording of gradient to metafile

Change-Id: I5efde15f1c192b15fe647362803442ac947b63de
Reviewed-on: https://gerrit.libreoffice.org/74505
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 3e50a01..eb240b0 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -50,6 +50,12 @@
{
    assert(!is_double_buffered_window());

    if (mbInitClipRegion)
        InitClipRegion();

    if (mbOutputClipped && !mpMetaFile)
        return;

    if ( rPolyPoly.Count() && rPolyPoly[ 0 ].GetSize() )
    {
        if ( mnDrawMode & ( DrawModeFlags::BlackGradient | DrawModeFlags::WhiteGradient | DrawModeFlags::SettingsGradient) )