diff options
author | Patrick Luby <plubius@neooffice.org> | 2023-01-24 20:28:22 -0500 |
---|---|---|
committer | Patrick Luby <plubius@neooffice.org> | 2023-01-26 14:19:29 +0000 |
commit | a0d825133656c6329c0e7e3b0b6bafbd51e87271 (patch) | |
tree | f8e3a4d703b2b6ea6295a5e3fcd15b2a6a1f237a /vcl/skia/gdiimpl.cxx | |
parent | f12ea381d52e2c26e966d15d281b41eafaddb5bb (diff) |
tdf#147342 Notify Skia that the window's backing properties changed
Change-Id: I4185a240a2ca6df1c92e86ff9950f86234d4ace8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146142
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.org>
Diffstat (limited to 'vcl/skia/gdiimpl.cxx')
-rw-r--r-- | vcl/skia/gdiimpl.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx index 15d901d93ff2..d0eb2ceaf51e 100644 --- a/vcl/skia/gdiimpl.cxx +++ b/vcl/skia/gdiimpl.cxx @@ -267,6 +267,7 @@ SkiaSalGraphicsImpl::SkiaSalGraphicsImpl(SalGraphics& rParent, SalGeometryProvid , mXorMode(XorMode::None) , mFlush(new SkiaFlushIdle(this)) , mScaling(1) + , mInWindowBackingPropertiesChanged(false) { } @@ -485,7 +486,7 @@ void SkiaSalGraphicsImpl::checkSurface() SAL_INFO("vcl.skia.trace", "create(" << this << "): " << Size(mSurface->width(), mSurface->height())); } - else if (GetWidth() * mScaling != mSurface->width() + else if (mInWindowBackingPropertiesChanged || GetWidth() * mScaling != mSurface->width() || GetHeight() * mScaling != mSurface->height()) { if (!avoidRecreateByResize()) @@ -2182,4 +2183,14 @@ void SkiaSalGraphicsImpl::dump(const char* file) const SkiaHelper::dump(mSurface, file); } +void SkiaSalGraphicsImpl::windowBackingPropertiesChanged() +{ + if (mInWindowBackingPropertiesChanged || !isGPU()) + return; + + mInWindowBackingPropertiesChanged = true; + performFlush(); + mInWindowBackingPropertiesChanged = false; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |