summaryrefslogtreecommitdiff
path: root/vcl/skia/gdiimpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/skia/gdiimpl.cxx')
-rw-r--r--vcl/skia/gdiimpl.cxx13
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: */