diff options
author | Patrick Luby <plubius@neooffice.org> | 2023-01-04 16:22:46 -0500 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-05 18:32:49 +0000 |
commit | 2d1a0d86d2d0c00fcfee61c39f2221e786e4245b (patch) | |
tree | f671e5a75ad294942a359daadf5bcbaa7dc52666 /vcl/skia/gdiimpl.cxx | |
parent | e5b5d9c8d33b1dd87e5a50856ad02f21df59dc5b (diff) |
Related: tdf#152703 Prevent possible hang when live resizing a window
Application::Reschedule() can potentially display a modal dialog which
will cause a hang so temporarily disable live resize by clampiing the
window's minimum and maximum sizes to the current frame size which in
Application::Reschedule().
Also, eliminate flickering during live resizing of a window when using
Skia/Metal. When in live resize, the SkiaSalGraphicsImpl class does not
detect that the window size has changed until after the flush has been
called so call checkSurface() to recreate the SkSurface if needed before
flushing. Flushing had to be moved during [self windowDidResize:] to eliminate
flicker. Flushing in [self displayIfNeeded] does not eliminate flicker so
apparently [self windowDidResize:] is called earlier.
Change-Id: Id3de838d2e17fee85cb583b6c4e862b571d47142
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145053
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/skia/gdiimpl.cxx')
-rw-r--r-- | vcl/skia/gdiimpl.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx index c2c22430dd5a..55f803217bb0 100644 --- a/vcl/skia/gdiimpl.cxx +++ b/vcl/skia/gdiimpl.cxx @@ -372,6 +372,11 @@ void SkiaSalGraphicsImpl::performFlush() { SkiaZone zone; flushDrawing(); + // Related: tdf#152703 Eliminate flickering during live resizing of a window + // When in live resize, the SkiaSalGraphicsImpl class does not detect that + // the window size has changed until after the flush has been called so + // call checkSurface() to recreate the SkSurface if needed before flushing. + checkSurface(); if (mSurface) { if (mDirtyRect.intersect(SkIRect::MakeWH(GetWidth(), GetHeight()))) |