diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx index ad92dbdcb380..18e35bf834eb 100644 --- a/vcl/skia/gdiimpl.cxx +++ b/vcl/skia/gdiimpl.cxx @@ -52,6 +52,10 @@ #include #include +#ifdef MACOSX +#include +#endif + using namespace SkiaHelper; namespace @@ -555,8 +559,22 @@ void SkiaSalGraphicsImpl::checkSurface() sk_sp snapshot; if (!isOffscreen()) { - flushDrawing(); - snapshot = makeCheckedImageSnapshot(mSurface); +#ifdef MACOSX + // tdf#172399 skip redrawing of old surface during live resize + // During live resize on macOS, there is a flood of resize + // events in quick succession so not only are most of the + // newly created surfaces short lived, but preserving and + // redrawing the original content drawn to the old surface + // is unnecessary since AquaSalFrame::SendPaintEvent() is + // is called after each resize event. + if (!ImplGetSVData()->mpWinData->mbIsLiveResize) + { +#endif + flushDrawing(); + snapshot = makeCheckedImageSnapshot(mSurface); +#ifdef MACOSX + } +#endif } destroySurface();