summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-07-15 12:16:47 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2020-07-16 18:30:14 +0200
commit0aa98f7b745a884639e722c0118387dd9f3f8990 (patch)
treea6197fd7ef504c82c37b151bd77f734cade42bf4 /vcl
parentd44ddfce0766f57ac7d14978dd9e12813af93ce7 (diff)
flush all Skia drawing before drawing to the screen
Otherwise xor drawing might not get applied. Change-Id: Ic1f9496c76c8f1162951e2ac4acbcd131c714a3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98885 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit b0ba9e835060f8f5daf3943a03039ed443705eba) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98839 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/skia/gdiimpl.cxx2
-rw-r--r--vcl/skia/win/gdiimpl.cxx1
-rw-r--r--vcl/skia/x11/gdiimpl.cxx1
3 files changed, 3 insertions, 1 deletions
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 0dcb74c410b2..d9c5ba487237 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1078,7 +1078,7 @@ Color SkiaSalGraphicsImpl::getPixel(long nX, long nY)
SkiaZone zone;
checkSurface();
SAL_INFO("vcl.skia.trace", "getpixel(" << this << "): " << Point(nX, nY));
- mSurface->getCanvas()->flush();
+ flushDrawing();
// This is presumably slow, but getPixel() should be generally used only by unit tests.
SkBitmap bitmap;
if (!bitmap.tryAllocN32Pixels(GetWidth(), GetHeight()))
diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx
index 43ced4e9639f..c42bd79fa22a 100644
--- a/vcl/skia/win/gdiimpl.cxx
+++ b/vcl/skia/win/gdiimpl.cxx
@@ -66,6 +66,7 @@ void WinSkiaSalGraphicsImpl::freeResources() {}
void WinSkiaSalGraphicsImpl::performFlush()
{
SkiaZone zone;
+ flushDrawing();
if (mWindowContext)
mWindowContext->swapBuffers();
}
diff --git a/vcl/skia/x11/gdiimpl.cxx b/vcl/skia/x11/gdiimpl.cxx
index 4754bfc64f95..93025c0ef7d1 100644
--- a/vcl/skia/x11/gdiimpl.cxx
+++ b/vcl/skia/x11/gdiimpl.cxx
@@ -128,6 +128,7 @@ void X11SkiaSalGraphicsImpl::freeResources() {}
void X11SkiaSalGraphicsImpl::performFlush()
{
SkiaZone zone;
+ flushDrawing();
// TODO XPutImage() is somewhat inefficient, XShmPutImage() should be preferred.
mWindowContext->swapBuffers();
}